How Do You Make A Checkpoint System?

Tutorials and guides for Plazma Burst and community features.

How Do You Make A Checkpoint System?

Postby Phant0mB0nnie » 7 December 2020, 19:55

Basically, if you die, you restart the map not from the very start, but at some point in the middle of it. I believe it requires SessionVars to work, but what I've tried so far isn't working. I definitely know it's possible, and I can list a few examples of maps that have this system, but I haven't been able to find any forum posts or open source maps that explain this.
Thanks in advance.

EDIT: So I actually managed to fix the problem myself. 8)
Still, feel free to post your method here for the convenience of others who may have this same question.
Later I may edit this message so that it includes my own method, as the checkpoint system is still fairly new to me.
Me in my imagination:
Complete and utter annihilation through superior volume of fire.

Me IRL:
Spoiler: Show More
User avatar
Phant0mB0nnie
Usurpation Destroyer [350]
 
Posts: 365
Joined: 21 January 2019, 23:37
Location: Inside my candy van. You can come too.

Re: How Do You Make A Checkpoint System?

Postby nightmar » 9 December 2020, 02:05

Phant0mB0nnie wrote:Basically, if you die, you restart the map not from the very start, but at some point in the middle of it. I believe it requires SessionVars to work, but what I've tried so far isn't working. I definitely know it's possible, and I can list a few examples of maps that have this system, but I haven't been able to find any forum posts or open source maps that explain this.
Thanks in advance.

EDIT: So I actually managed to fix the problem myself. 8)
Still, feel free to post your method here for the convenience of others who may have this same question.
Later I may edit this message so that it includes my own method, as the checkpoint system is still fairly new to me.


There is only one way to do this, but I am too lazy to write it myself so ima just let Nyove or Silk 1 give their instructions as usual.
How many bugs does this game have anyway? jeez
User avatar
nightmar
Usurpation Destroyer [350]
 
Posts: 393
Joined: 2 September 2017, 19:36
Location: Inside your closet or under your bed

Re: How Do You Make A Checkpoint System?

Postby Phant0mB0nnie » 9 December 2020, 13:12

lmao.
Alright. When I made the system, I used two regular variables and one session variable. However, it might be possible to use only one regular variable.
I had a region activate a trigger which would save the character's location by setting the value of the first regular variable (we'll call it A) to a distinct value. We then save that value to a SessionVar (call it SV). Then, I made a timer with "Launch on Start" set to Yes and had it execute a trigger as soon as the map finished loading. The trigger uploaded the value of SV to the second regular variable. (Not variable A. A different one, which we can call B) Then I used a trigger that would execute a series of trigger actions if variable B equaled a certain value. These trigger actions would teleport the player to a certain spot on the map so he could pick up where he left off.

There's a bit more to it than that, and I think Nyove could probably do it better with the fancy step by step tutorials, but this is about the gist of it. Just make sure you get all the values correct and don't get the variables mixed up. I advise putting a () or [] around the variable names, or putting a ~ at the start of them so they don't get mingled in with regular text.
Me in my imagination:
Complete and utter annihilation through superior volume of fire.

Me IRL:
Spoiler: Show More
User avatar
Phant0mB0nnie
Usurpation Destroyer [350]
 
Posts: 365
Joined: 21 January 2019, 23:37
Location: Inside my candy van. You can come too.

Re: How Do You Make A Checkpoint System?

Postby jeje52 » 9 December 2020, 15:24

I made an open-source map for this: jeje52-checkpoints

Basically just session variables. The player is moved to a different region depending on what value the session variable has. I don't think there's much to explain about it, or what can be explained is better explained by the map source. There are commands to restart from the beginning or to go back to the previous checkpoint.
User avatar
jeje52
Civil Security Lite [100]
 
Posts: 146
Joined: 13 April 2018, 19:52


Return to Tutorials

Who is online

Users browsing this forum: No registered users