Heal Command?
jmnevil54
23 May 2017, 20:21Hi. 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.

DarkLizerd
23 May 2017, 20:51Looks 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.
jmnevil54
23 May 2017, 22:32How would I do the use command if I am using the web editor?
jmnevil54
23 May 2017, 22:33Wait, I'll just put it in the object verbs. Nevermind.

DarkLizerd
24 May 2017, 02:49Sometimes... just saying it out loud solves the problem.