1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

On walk on activator rail

Discussion in 'Skript' started by Anomalyforlife, Sep 11, 2022.

Thread Status:
Not open for further replies.
  1. Anomalyforlife

    Joined:
    Sep 11, 2022
    Messages:
    2
    Likes Received:
    0
    Hi guys, I'm new and I really need a way to figure out how to check if a player is walking on an activator rail.
    I'm trying to make a gamemode where the hunter can place traps, and the activator rail is the selected block.
    But whenever i try to use On walk on activator rail, it works only if i jump
     
  2. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    48
    Likes Received:
    0
    Activator rail is a non-full block, meaning that you are passing through it when you "walk" on it. My guess would be that the "on walk on" event scans the block that has Y value 1 less than the player triggering it every time he moves; thus it scans whatever the rail is laid on, instead of the rail. Even though of course human would say you are walking on the rail, the computer only sees you as passing through the block of rail, and _literally_ scans the block below.

    This behavior should be able to be avoided if you use plain "on walk" instead, and use a condition "block at player is activator rail", or something similar.
    Hope that helped. If not, sorry for wasting your time. Cheers.
     
    • Agree Agree x 1
    • Creative Creative x 1
  3. Anomalyforlife

    Joined:
    Sep 11, 2022
    Messages:
    2
    Likes Received:
    0
    Yeah, i noticed this because when i jump the event get activated, but i'm scared that the "on walk" may cause the server to lagg
     
  4. lotzy

    lotzy Active Member

    Joined:
    Mar 15, 2022
    Messages:
    139
    Likes Received:
    22
    on step , and on move the same events
    upload_2022-9-12_17-23-16.png

    upload_2022-9-12_17-24-19.png
     

    Attached Files:

  5. Pierrelasse

    Pierrelasse Active Member

    Joined:
    Apr 20, 2022
    Messages:
    116
    Likes Received:
    4
    on step checks the block BELOW the player means you would need to do
    Code (Text):
    1.  
    2. on step:
    3.   if block at player is activator rail:
    4.     send "ok"
    5.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...