D
Doooooli
Guest
I have a simple spell, which when it collides with a certain block it pushes the block in a direction 10 pixels!
So this is what I have so far
In theory everything works, but that isn't exactly how I wanted it! You see I want the block to be pushed in the direction that the player is looking to! So if I hit it from the right it should go right, and vice versa on the left, and if I hit it from the bottom it should go up and vice versa for up! Which I believe isn't too hard to achieve, but what I tried did not work and produced an error! What I tried was,
but to no success! So if anyone would like to tell me how to fix it I would be pleased
thx!
So this is what I have so far
Code:
other.y -= 10;
Code:
other.obj_player.knockbackspell.direction -= 10;
thx!
Last edited by a moderator: