How to Make a Sprite Move Back and Forth (like a sentinel) in a platform game

Hi,

Just want to ask what are the blocks that I need to use to make a sprite move back and forth (like a sentinel) in a platform game? For example, this sprite should move to far right of the platform and then turn around and move to the far left of the platform, then go back and forth…

1 Like

you can use the tilemap location of the sprite in the scene category to check if the next tile it walks on is empty or not

you mean, like this?

comments are in the project!

1 Like

https://github.com/neverstopthecoder/moving-extension yes try this extension I made

Thanks. This lesson is for Year 7s, is there a simpler way of doing these codes?

why yes (ahem cough.. cough.. extension above) although I forgot to mention its not perfect but it does work

1 Like