How do I make an NPC hurt the hero?

From OHRRPGCE-Wiki

Jump to: navigation, search

You can set the NPC activation to "Touch" and set it to run a script like this.

To do so we will use plotscripting. To be precise we need tweak palette, update palette, reset palette and set hero stat.

tweak palette (20,0,0) #he's been hurt, so flash the screen to show that
update palette
wait (2)
set hero stat(me,stat:HP,current stat--2)#this sets the damage

reset palette
update palette

With this example the hero lost 2 health points (HP). Don't forgot to change stat:HP if you've renamed the HP stat.

Also, you don't necessarily need to hurt the lead hero (me); you can hurt another hero by specifying their place in the party instead of me.

If you want to hurt everyone in the party, you can copy and paste the hero stat four times, once for each party member (or, you could use a loop. But, that's beyond the scope of this article)

Personal tools