The patrol behavior will make your specified object move back and forth as if it were patrolling an area.

This behavior will trigger an event once it reaches the destination.



Object A

This is the object that will be patrolling. By default the current object is selected, but by tapping the graphic you can choose any other object in the scene.


You can apply a motion tween effect to the movement of your patrolling object. By default linear is selected.

X Movement

This is how far you want the object to move horizontally from the current location. A negative number implies it will move left.

Y Movement

This is how far you want the object to move vertically from the current position. A negative value means it will move downwards.


This is how long it will take for the object to move back and forth. A shorter duration means your object will move faster.

Flips Graphic

This toggle determines wheter or not the graphic will face the opposite direction when it moves back and forth. There is a separate toggle for X and Y movements. By default the Flip X toggle is on.

Lock Rotation

This stops your object from being able to rotate

Play Animation

This toggle determines where or not an animation will play as the object moves.

Number of Times

This value is how many times you want the object to go back and forth. A value of 0 means the object will continue to patrol for ever.

Custom Animations

Select an animation cycle to play while the object is moving


Object ID

This outputs the Object ID.




This behavor is perfect for basic platformer enemies that simply move back and forth to protect an area. Using this behavior you can create an enemy like the Goomba in Mario. 



Have more questions? Submit a request


Article is closed for comments.