Issues with platformer game enemies

I’m making a platformer game with different enemies in it, and I’m having an issue with the enemies. I’m asking, is it possible to have an enemy turn the other way when getting to the end of a platform instead of just falling off the edge?

yes. search goomba on the forums and you will find your answer.


On game update:
    if ( Tile below [Sprite] = Trasparency ):
        mySprite.vx = mySprite.vx * -1

Actual Project:

I just now tried it, and it doesn’t seem to work. I don’t know what’s wrong, as i did everything the code is telling me to do.

Could you send a link to the game?

Yep, here it is

It seems that the on game update function is… entirely non-functional?
I genuinely have no idea what’s causing this, hoping someone else can find out what’s going on here.

look in the on game update and select a block that specifies a time like “on game update every 500 milliseconds”. I’m not certain that this will fix this particular problem but it might help and prevent some future problems.

It…uh…didn’t seem to work.
I put it into the block you specified, first with 500 ms, and then 1 ms. Neither worked.
I don’t know what to do. :frowning_face: