Trigger when player stands on pressure plate

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

iStopcontact

Member
Feb 18, 2017
113
2
18
23
Hello guys, I'm working on my own Parkour skript, and now i want to have that when a player stands on a golden pressure plate it wil set the checkpoint.
I found the command to make it do something for all pressure plate:
code_language.skript:
on stepping on a pressure plate:
    if {kitpvp:join:%player%} is false:
        send "test" to player
    if {kitpvp:join:%player%} is true:
        cancel event

But how can i do my code to do it for example:
Only when player stand on golden pressure plate or iron pressure plate.
 
Try this.
code_language.skript:
on stepping on a pressure plate:
    if event-player is player:
        if {kitpvp:join:%player%} is false:
            send "test" to player
        if {kitpvp:join:%player%} is true:
            cancel event
 
@YoshYz Ty that worked, but how can i make it now that it has a kind of delay.
Because now when i player stands on the pressure plate it keeps replaying that command but i only want it once
 
@YoshYz Ty that worked, but how can i make it now that it has a kind of delay.
Because now when i player stands on the pressure plate it keeps replaying that command but i only want it once

Something like that should work:
code_language.skript:
on stepping on a pressure plate:
    event-block is a golden pressure plate
    {delay::%uuid of player%} isn't set
    if {kitpvp:join:%player%} is false:
        send "test" to player
    if {kitpvp:join:%player%} is true:
        cancel event
    while block 1 blocks below player is a golden pressure plate:
        set {delay::%uuid of player%} to true
        wait 1 second
    delete {delay::%uuid of player%}
 
Status
Not open for further replies.