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.

2 Rows of Hearts

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

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

    TullyMastully Member

    Joined:
    Aug 9, 2017
    Messages:
    38
    Likes Received:
    0
    Hey,
    I wanted to know if it's possible to do 2 Rows of hearts in Skript, and if so, How?


    Thanks in advance,
    Tully.
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    You could always give the player health boost 5 for 999 days

    Code (Skript):
    1. apply health boost 5 to the player for 999 days
    You could also repeat the effect on the player when he respawns, using the on respawn event; and every time he drinks milk, wait a second then repeat the health boost effect.

    Oh. The more you know. That may prove useful for me, too. Thanks :emoji_stuck_out_tongue:
     
    #2 ShaneBee, Aug 18, 2017
    Last edited by a moderator: Aug 18, 2017
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    You can also set the Max health of an entity with this expression
    [​IMG]
     
    • Informative Informative x 1
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Is there a way to save the amount of hearts they have? Like if they joining having a maximum health of 15 and do a quest rewarding them an extra heart then logoff, could the maximum health of 16 be saved using on leave?
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    you could save the amount to a player specific variable or make it permission based but you would have to set it on join
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Everything can be set to a variable.
    Code (Skript):
    1. set {health.%player%} to 42
    2. set the maxinum health of the player to {health.%player%}
    When you complete the quest, update the variable and the health. Easy.
     
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Ok, but would there be a way to update their maximum health without having like a timer running checking every 30 seconds each players {health.%player%}?
     
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    once you've set their health it wont change unless they leave. so you can avoid the timer by just having it set on join and update when the quest is done like XUnidentified said
     
  9. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Ok, thank you both for the help and sorry for hijacking this thread
     
    • Like Like x 1
    • Friendly Friendly x 1
  10. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    haha no worries XD
     
Thread Status:
Not open for further replies.

Share This Page

Loading...