Spawning from last safe position

Get help using Construct 2

Post » Sun Feb 17, 2013 4:39 pm

Hi guys

I've tried searching this but cant find an answer. Im trying to get my player to respawn at a last specific safe spot ie on a platform just before a fall to death. I thought about placing a transparent collision box with a bool variable set to trigger true once the player enters it, so if he falls, he should respawn to last true variable bool. Problem is, I dont think that would work since i dont know how to set all other instances' bool to false.

Is that the wrong way to go about it?
B
6
Posts: 30
Reputation: 1,260

Post » Mon Feb 18, 2013 5:44 am

Maybe another easier way to do this?
B
6
Posts: 30
Reputation: 1,260

Post » Mon Feb 18, 2013 7:06 am

Managed to sort it out. For anyone interested:

created transparent collision sprite 'checkpoint'
created transparent collision sprite 'Spawner'

when character enters collision of checkpoint, move spawner to checkpoint position.

You can then CTRL+Click/drag the checkpoint sprite across your level.
B
6
Posts: 30
Reputation: 1,260

Post » Mon Feb 18, 2013 10:34 am

Yes that's one way....there are plenty of others..
But the way you chose would also let you set position of the spawner anywhere at anytime during your layout runtime...for any possible event...
Not just Ctrl click dragging...you could do it via events at pre determined runtime events...
You have the basic premise correct though.. Bravo:-)
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
29
S
11
G
8
Posts: 313
Reputation: 7,335

Post » Mon Feb 18, 2013 1:41 pm

Maybe you could set the spawner to player position as long as he is on ground? The platform behavior has an action to check that.

B
106
S
35
G
37
Posts: 798
Reputation: 25,215


Return to How do I....?

Who is online

Users browsing this forum: Calfuso, ETgirl79, totoe, Yahoo [Bot] and 21 guests