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.

Stop Action bar

Discussion in 'Skript' started by TullyMastully, Aug 25, 2017.

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

    TullyMastully Member

    Joined:
    Aug 9, 2017
    Messages:
    38
    Likes Received:
    0
    Hello,
    I wanted to know how to make so if a player hits another player,
    it will stop the action bar, for example.
    I made a timer using the action bar, that displays 30 seconds, I want the Timer (Action bar) to disappear when hitting a player

    Thanks in advance,
    Tully.
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Just send an action bar with no message.
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Yes, but then it just skips one action bar and continues,
    Is there any possible way to remove it completely?
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    set a variable, display the action while the variable is set (using a while loop) and then delete the variable when the player gets hit.

    It would be something like this:

    Code (Skript):
    1. set {cooldown::%player's uuid%} to true
    2.  
    3. while {cooldown::%player's uuid%} is set:
    4.     #display the action bar
    5.     wait 1 second
    6.  
    7. on damage of player:
    8.  
    9.     attacker is a player
    10.     clear {cooldown::%victim's uuid%}
    11.     #display a blank action bar here
     
Thread Status:
Not open for further replies.

Share This Page

Loading...