Solved Mushroom Stew Help

  • 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 community!

    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.

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
on consume:
event-item is a Mushroom Stew
add 3 to player's health
remove 1 bowl from player's inventory

QUESTION: How do i make it so that if the player is at max health, then they cant consume the bowl?
 
on consume:
event-item is a Mushroom Stew
add 3 to player's health
remove 1 bowl from player's inventory

QUESTION: How do i make it so that if the player is at max health, then they cant consume the bowl?
try

code_language.skript:
if player's health is more than 20:
    cancel event

if the error come out:

There can't be cancelt event. then use this way... (can be buggy, MAYBE)
code_language.skript:
if player's health is more than 20:
    set player's tool to mushroom stew
 
Ok so here is the problem with that, it works but... I have a perks script that makes it so when upgraded to max lvl the player has 20 hearts at max, so how would i cope with that
 
Ok so here is the problem with that, it works but... I have a perks script that makes it so when upgraded to max lvl the player has 20 hearts at max, so how would i cope with that
Math stuff. xD example:

code_language.skript:
set {_max} to 5 * {Upgrade::Health::%player%}
# example, this variables is 2 {Upgrade::Health::%player%}
#Btw i buyed this "Upgrade" 2x times. and each one will i get +5 health
set {_max} to {_max} + player's health
if player's health is more than {_max}:
#todo
 
Status
Not open for further replies.