Enemy not moving from tutorial


#1

I was doing the GDevelop tutorial and was trying to do the enemy when it stopped moving when I went into the game. Does anyone know why this would happen or how I could fix this?
here is a picture of the events for the scene:


Thanks, Ollie
edit: here is the link to the tutorial (page I was on): http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platform-game/6-add-enemies


#2

you try to use a text with numbers.
there are 2 types of variables, text (also called string) and numbers.
you use the condition
Variable (Scene variable = number) direction
instead of
Text of the Variable (Text of scene variable = String) direction.


#3

thanks, it seems to now read the changes but the character still does not move, do you know how this would work.
Thanks


#4

You mean the player? You need to give the player the platform character behaviour. In your scene editor DoubleClick on your player. A window should pop up where you can setup your sprites. On the top right in this window you find behaviours.


#5

Thanks, I meant the enemy. In the platform Ed it seems to not be moving. I can tell that the numbers have worked because it os flipping it. It seems to stay still and play the animation. Do you know why this would be. Thanks for your help


#6

since you use permanent forces, try trigger once for the condition if Text of Variable direction =“left”/“right”

but it should work anyway.
do you have more events, other then the ones shown in your screenshot?
did you position your directionchangers correctly? does it stop on the left side? not move at all?