Jump to content

Triggering events in levels


Sawyer
 Share

Recommended Posts

I've managed to import a 2D side-scrolling tilemap into Phaser.  My question is, whats the most efficient way to go about triggering events at certain points of the level? For example, say I wanted to show a particle near the end of the level.

 

The idea I had in mind, was to put in a transparent object layer into my tilemap and use the overlap detection to trigger this.  Would this be the recommended way to go about things?

 

If so, could someone give me a quick walkthrough of doing this?

 

I've created the object layer in Tiled and inserted the tiles into my map.

Link to comment
Share on other sites

I'm thinking this:

using tiled you can put objects at certain positions with the propertie trigger and bomb by example.

then in phaser you load all objects from tilemap. now you have a list with triggers, their position and what kind of sprite or elment you should put. like 'Bomb'.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...