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.

Not allowing players to exit an armorstand

Discussion in 'Skript' started by JackyBoy, Jan 28, 2018.

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

    JackyBoy Member

    Joined:
    Feb 4, 2017
    Messages:
    104
    Likes Received:
    1
    Hey there, I have this system where a player can sit on an armorstand but they can press shift to get off. I want it so they will be stuck on the armorstand untill the entity is kill.

    Overall - Can someone please help me make a system when a player is sitting on an armorstand and tries to leave it. it wont let them
     
  2. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    60
    just do:

    when player ride the armorstand, add
    -While checking if player still riding
    -if yes: Wait a ticks or seconds or what ever
    -if no: Make player ride again the armorstand.

    #Edit

    I found my old "Boss battle"

    Code (Skript):
    1. make {_p} ride victim
    2.                     loop 30 times:
    3.                         if victim's passenger isn't set:
    4.                             make {_p} ride victim
    5.                         wait a ticks
    6.                     make {_p} leave from his vehicle
    The boss is just grab the player with him after 1.5 Seconds (30 Ticks) He will push him away. (Remain, this snippet its in Damage events so change Victim if youre doing in commands or somethings
     
    #2 ChisleLP, Jan 28, 2018
    Last edited: Jan 28, 2018
  3. Pikachu

    Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    139
    Medals:
    you can see my login script does this using packets. Unfortunately, spigot doesn't allow you to cancel dismount event so you'll have to cancel the packet or set it's boolean that controls dismount to false
     
Thread Status:
Not open for further replies.

Share This Page

Loading...