Collision_response_start / collision_response_finish events

Are there some collision_response_start and collision_response_finish events (messages) which mark start and end of collision between two objects?
If no, then can you add them?

There are for triggers. See http://www.defold.com/ref/collision-object/#trigger_response:other_id-enter-group

2 Likes

I got a similair question. For example i have a ladder and it should tell me when i enter and exit the ladder. If i would realize this with trigger i cant use it in with Tilemaps.

Is there another way to find out if i enter and exit?

Is the ladder a part of the tilemap or a separate game object?

It is part of the tilemap. So i have 2 different collisions in the tilemap like “world” and “climp”. So right know i just did a sperate game object for the ladder but this would slow down the process of creating maps with tilemaps. Or do i miss here something.

If you need entities on your maps consider making your tilemaps in Tiled instead. Look at this example:

OK thank you yeah i though about Tiled too. So right now there is no solution in defold for this. So i just have to use Tiled or create “ladder” gameobjects.

Thanks for the answer

You could collect the ladders positions by iterating the layer in the tilemap using tilemap.get_tile() and creating game objects accordingly. That way you can easily move the ladders around or add/remove new ones. Works for other items too ofc, such as pickups etc.

1 Like

Hi that sounds really good! Thanks gonna do that.

If you don’t mind having entities only on a grid I’d still recommend using Tiled. You can export Defold .tilemaps from Tiled as of the latest version just enable the Defold plugin. Defold’s tilemap editor is usable, but it is missing many time saving, productivity features.

(Although I just tested Windows Tiled and it appears the latest doesn’t have the Defold plugin included only OS X/Linux?? Is that different for anyone else? Edit: fixed! https://github.com/bjorn/tiled/issues/1343#event-762627677 )

Isn’t that sufficient to be able to implement ladders that the player can climb? I created an example of this here:

Try it here: http://britzl.github.io/publicexamples/platformer_with_ladders/index.html

1 Like