[SOLVED] Rectangle function


Hello, Is it possible to manage animation or flit using the rectangle function ?

It’s a great function but I need to change the animation ( up,down,left_right) and automatizate flip.



Can you explain what do you want the object to do? (perhaps draw it)


Hi @ tristanrhodes
thanks for your answer.

I’m using the rectangle function to move a soldier following thes directions:
The sprite has these animation:

  • leftright
  • up
  • down

I would like to change the animation:
use leftright animation on right direction
use up animation on up direction
use down animation down direction
use leftright flipped animation on left direction

The example code is here:



Hi I’ve made a simple modification to the Extension so you can sync the movement with the animation
What I changed is the

  • Object from Object type to Sprite
  • Added a property checkbox bool to set sync with the animations
  • Added 4 animations to the player Left, Right, Up, Down
  • Added inside the Extension the animations with those names.

I don’t know if this is what you want here the project, hope this helps.
I’m pretty sure there will be a better way to do this but that needs a better mind that mine, maybe @tristanrhodes can do it better.



Wow, you are a fu**g genius. Thanks


Rather than require specific animation names, how about adding 4 conditions?


Then the user will have more flexibility on what happens when those states are triggered.


Sure that would be awesome, I just modify the Extension to fit the needs of @jumpingj, but if those 4 conditions are added it will be nice.


I will add those conditions and submit it as an update to the official extension.


Wow, thanks a lot for your work


Hello @tristanrhodes
I also suggest you to add a pause action.
condition: gameplay is in pause status
actione: pause the rectangle movement



You can already do this by disabling the extension (built in GDevelop feature )


This link includes my updated version and example. I expect it will be added to GDevelop in a few days.


Yeah, it works. Thanks