Spawning from last safe position

0 favourites
  • 5 posts
From the Asset Store
Show your master of martial arts by killing all flies empty handedly!!!
  • 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?

  • Maybe another easier way to do this?

  • 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.

  • 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 could do it via events at pre determined runtime events...

    You have the basic premise correct though.. Bravo:-)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)