On walk on activator rail

  • 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.
Sep 11, 2022
2
0
1
19
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
 
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
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.
 
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.

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
 
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
on step , and on move the same events
upload_2022-9-12_17-23-16.png


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

Attachments

  • upload_2022-9-12_17-24-9.png
    upload_2022-9-12_17-24-9.png
    74 KB · Views: 65
  • upload_2022-9-12_17-24-16.png
    upload_2022-9-12_17-24-16.png
    74 KB · Views: 60
on step checks the block BELOW the player means you would need to do
Code:
on step:
  if block at player is activator rail:
    send "ok"
 
Status
Not open for further replies.