Simple level change function!!

I need a simple function that will change the director class level when two specific objects collide and rest on each other with a 3 second delay to the next level…
what would this look like and how many different ways could I write it?

Thanks in advance! :stuck_out_tongue: [import]uid: 10355 topic_id: 7983 reply_id: 307983[/import]

Anyone? [import]uid: 10355 topic_id: 7983 reply_id: 28688[/import]

Well, the pause for 3 seconds and then switch Director screens could look like this:

[lua]local function switchScreens()
director:changeScene(“scrn-help”,“fade”)
end

timer.performWithDelay( 3000, switchScreens )[/lua]

And here’s a sample project that shows how the Physics engine works with collisions:
http://developer.anscamobile.com/content/collision-detection

If you’re wanting to do collision detection without the physics engine, there’s a thread here that looks like it has some good info:
http://developer.anscamobile.com/forum/2010/10/29/collision-detection-without-physics

Hopefully that will help you get started down the right track.

Jay
[import]uid: 9440 topic_id: 7983 reply_id: 28705[/import]