Player clicks–> makes the sprite rotate to the direction of click
sprite constantly moves in the direction which it is facing
On colision make sprite stop.
The problem is this- sometimes when it colides and the sprite stops, I cant get it to start moving again! It just gets stick on a wall.
heres the logic
I am attaching the example file too. Not sure if its graphics will be visible. I wish gdevelop could optionally pack all the graphics within the game logic file.
EDIT: Ahh sorry, filed it in the wrong section of the forum. I am doing this with gdevelop, not gdevapp clickMovement.gdg (15.2 KB)
When you have the event player is in collision with wall : Stop player - Add an action to move the player away from the wall so they are no longer in collision.
e.g.
Player is in collision with wall : Stop the object player
Sub-event
x position of wall is >= player.X() : Do -5 to x position of player.
x position of wall is < player.X() : Do +5 to x position of player.
y position of wall is >= player.Y() : Do -5 to y position of player.
y position of wall is < player.Y() : Do +5 to y position of player.
Now your player will no longer remain in collision with the wall. You may have to adjust the value ‘5’ to find what works for you (the least you can use is best).
Also, is your 2nd event there not accelerating the player constantly? Is that what you intended?