Author Topic: [Help Needed] How do I script stages (checkpoints) for an obstacle course?  (Read 677 times)

0 Members and 1 Guest are viewing this topic.

Oakley

  • Jr. Member
  • **
  • Posts: 65
  • Have a great day :)
    • View Profile
    • Check me out on Twitch
    • Awards
  • Xbox: MisterCreeperX
[Help Needed] How do I script stages (checkpoints) for an obstacle course?
« on: April 19, 2017, 07:25:12 PM »
Hello

I made a thread about a world in which I was making an obstacle course. This obstacle course is going to have stages, so when a player dies they can return to the stage they reached instead of having to start again. I tried the script suggested by TheDestinedCrab but when I tested it out I still ended up back at the beginning after I died. Here is a quote from TheDestinedCrab which contains the script that he suggested, I made this script exactly as he put it:

The pad bit would be pretty easy. The pad would be a textured pressure plate with a script block underneath.

Spoiler for script:
Here's the script to play when the player steps on the pad:

History [player] [stage] [+1]

And here's the one to play when they die

If
HasHistory [player] [stage] [=] [1]
Then
Teleport [x,y,z]
Elseif
HasHistory [player] [stage] [=] [2]
...

Also, speed and low gravity can be done in zones.

Good luck with it!
TheDestinedCrab.

He hasn't been online in a day or two, which is why I am making this topic, so is there any other way to script checkpoints?
_
__
___
____
_____
______
_____
____
___
__
_

What could be in here I wonder (͡ ͜ʖ ͡)
Spoiler for Hidden Content:

Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4208
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: How do I script stages (checkpoints) for an obstacle course?
« Reply #1 on: April 19, 2017, 10:47:49 PM »
Var [х] = [history:checkpoint/x]
Var [y] = [history:checkpoint/y]
Var [z] = [history:checkpoint/z]
Teleport [player] [x,y,z]

Set that as the respawn script, And for the checkpoint addition script, All you need to do is set the player's checkpoint history marks to the coordinates of the checkpoint.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Oakley

  • Jr. Member
  • **
  • Posts: 65
  • Have a great day :)
    • View Profile
    • Check me out on Twitch
    • Awards
  • Xbox: MisterCreeperX
Re: How do I script stages (checkpoints) for an obstacle course?
« Reply #2 on: April 19, 2017, 11:55:23 PM »
Var [х] = [history:checkpoint/x]
Var [y] = [history:checkpoint/y]
Var [z] = [history:checkpoint/z]
Teleport [player] [x,y,z]

Set that as the respawn script, And for the checkpoint addition script, All you need to do is set the player's checkpoint history marks to the coordinates of the checkpoint.

Thanks, just to clarify though, is the x y and z where the coords of the checkpoints go?  And do I set their history by adding History [name] [player] [+1] to the script?
« Last Edit: April 20, 2017, 12:51:53 AM by Oakley »
_
__
___
____
_____
______
_____
____
___
__
_

What could be in here I wonder (͡ ͜ʖ ͡)
Spoiler for Hidden Content:

Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4208
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: How do I script stages (checkpoints) for an obstacle course?
« Reply #3 on: April 20, 2017, 10:49:54 AM »
Var [х] = [history:checkpoint/x]
Var [y] = [history:checkpoint/y]
Var [z] = [history:checkpoint/z]
Teleport [player] [x,y,z]

Set that as the respawn script, And for the checkpoint addition script, All you need to do is set the player's checkpoint history marks to the coordinates of the checkpoint.

Thanks, just to clarify though, is the x y and z where the coords of the checkpoints go?  And do I set their history by adding History [name] [player] [+1] to the script?

Don't do +1, Set that to the coordinate at that position. Otherwise, Yes.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym