playMaker

Author Topic: Checkpoints  (Read 2377 times)

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Checkpoints
« on: November 19, 2013, 03:08:16 AM »
Hello,

I've searched for some checkpoint solutions and ArrayMaker came up. But I'd like to go for the simple way first if I can get away with it. I need a typical playformer checkpoint system with around two per level. One at the beginning and one in the middle of the level.

I've played around with Set Position that is triggered by a Hazard but this seems to limit me to only one checkpoint per level. Is there anything I'm missing with this approach that will enable me to set multiple checkpoints? Right now, I've just simply plugged in the coordinates of where I want the player to spawn, but as I've said, this limits me to one per level.

Thanks in advance!

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Checkpoints
« Reply #1 on: November 19, 2013, 05:06:14 AM »
I am not sure I understood your question...but if you are trying to save variables at runtime, did you try playprefs ?
Visit my portfolio: http://www.yanivcahoua.com/

intrikit

  • Full Member
  • ***
  • Posts: 132
    • Defiant Child
Re: Checkpoints
« Reply #2 on: November 19, 2013, 01:16:57 PM »
I am trying to save player progress so that once the player gets to a certain point in the level they will be spawned to those points depending on how far they got. For instance, if the player dies near the end of the level they will be spawned at halfway instead of starting again etc.

I've read something about PlayRefs as this was brought up in another similar topic however I am not sure how I would use this.

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Checkpoints
« Reply #3 on: November 20, 2013, 04:56:07 AM »
I havent's used playprefs yet, but I think this is what you need,.
Just google it you'll find a lot of info on it, there are playmaker actions as well, I think it should be plenty to start with.

https://hutonggames.fogbugz.com/default.asp?W545

When the player go through a trigger, save the location and a few parameters you want to restore on respawn.
When you respawn the player set its location and parameter you just saved.

It's just a matter of saving certain properties I believe.
Try it
Good luck
Visit my portfolio: http://www.yanivcahoua.com/