How would I make a healing item that would affect different party members differently? For example, a chocolate bar that heals human characters, but hurts the dog if you give it to him.
HP-recovering varies by person
RPG Maker VXAce Supportin the damage formula:
a.id == dog_id ; -100 : 100
will give 100 HP to the human party members but -100 HP to the dog (of course replacing dog_id with the id of the dog, no leading zeros).
a.id == dog_id ; -100 : 100
will give 100 HP to the human party members but -100 HP to the dog (of course replacing dog_id with the id of the dog, no leading zeros).
What if I wanted more than one person to be healed differently from an item? What if there were two dogs? Would it just be as simple as
a.id == 1, 2 ; -100 : 100
[1,2].include?(a.id)
It's got to be correct syntax
It's got to be correct syntax
So, in the formula box, it should say
[1,2].include?(a.id) ; -100 : 100
Is this right, or did I get something wrong?
[1,2].include?(a.id) ; -100 : 100
Is this right, or did I get something wrong?
Sorry - made a typo. It should be ? instead of ;
[1,2].include?(a.id) ? -100 : 100
Seems it's not my day for RM support.
[1,2].include?(a.id) ? -100 : 100
Seems it's not my day for RM support.
Original thread: https://forums.rpgmakerweb.com/threads/hp-recovering-varies-by-person.67667/