Bypass sprite collision


Is there a way to make the player ignore collisions with certain sprites? I'd like my player character to draw over the sprite instead of interact with it.

Thank you!

Why do they need to be sprites? There are three kinds of tiles you can place in a room - world tiles, sprites, and items. World tiles can be solid or non-solid. Sprites are always solid. Items are always non-solid. If you want the player to be able to walk over a tile, make it a non-solid world tile or an item tile.

To stop the default behaviour of an item tile being collected when walked onto, you just need to add a collect event to its script e.g.

on collect do

As long as you define a collect event that will override the default collect behaviour.

If you really need a sprite without collisions, you can use goto in the sprite's interact event like this:

on interact do
  goto event.x,event.y

When the player walks into the sprite the interact event is called on the sprite, and the goto will then move the player to the sprite's position.

1 Like

Thanks orkn, I will give that a try! I need to attach a script to this tile in particular so a world tile won't work. I'll try converting it to an item and overwriting its collect event first.

Converting the sprite to an item and then overwriting the default collect event fixed the issue! Thanks again.

1 Like