What would cause this collision to not work?

So the VanishBlock has platform behavior. So I figured, maybe it’s because it’s a platform? So I detected if it’s a platform and deactivated the behavior, but nothing changed. I also tried changing the scene timer instead of object timer with no difference.

Any help is much appreciated! :slight_smile:

If “VanishBlock” has an active Platform behavior it will never collide “Kitaroni” (assuming “Kitaroni” has an active platform behavior too, right? … and deactivating the platform behavior when it collides don’t work because it never collides in first place).

Gotcha! That makes plenty of sense. I’ll see what I can do.

You can add an extra object “feetsHitbox” and locate them always at the bottom of the player. Platformer behavior locates the player one pixel above the ground, so you have to locate this feetsHitbox at least one pixel or two under the player bottom.

That was perfect! Which brings me to another question/problem.

Let’s say I have multiple of these vanish boxes where a player can jump across as quickly as they can. Do I need to duplicate all the objects, rename them and set each event up for the object(s) or is there a way I can only vanish the current block but not the others? Right now when I touch one of the vanish blocks, they all disappear at the same time.

Thanks!

You can use a single object (and multiple instances), and it’s recommended :slight_smile:

If you want to do it with timers you can do:

  • At the beginning pause the “vanish” timer of every VanishBlock:

Conditions: At the beginning of the scene Actions: Pause timer "vanish" of VanishBlock

  • When you collide with a VanishBlock, unpause its timer (you can do other things here as changing the VanishBlock animation to a shaking one):

Conditions: FeetsHitbox collides with VanishBlock Actions: Unpause timer "vanish" of VanishBlock

  • Now you can check the timer of the VanishBlock instances, for example to delete each VanishBlock one second after the collision:

Conditions: Timer "vanish" of VanishBlock is greater than 1 second Actions: Delete object VanishBlock