Hi. I'm trying to make it so that I can heal a player with a command. I already have an attribute set up for "potions", and I'll eventually set it up so that when it heals, the attribute decreases.
This is what both of them look like so far.
Heal Potion #object#
if (player.hyper_potion > 0) {
if (player.hitpoints < player.max) {
player.hitpoints = player.hitpoints + 60
}
}
Heal Hyper Potion #object#
if (player.potion > 0) {
if (player.hitpoints < player.max) {
player.hitpoints = player.max
}
}
I'm just really not sure how to set them up, and how to type them.
Looks like your typing is correct, maybe the names swapped...
Potion heals
hyper potion is full heal
I think, make a object "potion" and "hyper potion" and put the code in the "use" command.