Page 1 of 1

Revive Fallen Ally (RPG 2.8.1)

Posted: January 27th, 2013, 2:04 pm
by coopziana
I've created a nice little off-hand weapon that creates an AoE healing spring that basically heals you! I figured it might work if cast on a fallen ally... I was wrong!

So my question is: Is there any way to code the weapon to revive (change from CS_DEAD to CS_ALIVE) when casting the spell on them?

I'm sure it's just a simple case of:

if (r_state_get self) CS_DEAD
Then make self CS_ALIVE

But as you can plainly see my coding is obviously top notch (Sarcasm :P ). If someone could let me know what script to use that would be awesome, then I can just link the Script to my item and Bingo-Bango it'll work a treat!

Need this as i'm making a map where a castle of allies is under seige by (hopefully) around 50-75 enemies plus 4 Trebuchet's with a range of about 1million lol. Of course the story goes that your allies are dropping like flies and you could either run out and try to take down all the enemies alone or tactically attack the enemy while resurrecting fallen allies.

Hope that makes sense!

Re: Revive Fallen Ally (RPG 2.8.1)

Posted: January 27th, 2013, 8:20 pm
by Hirato
Give it a script effect that invokes r_resurrect on the target.

Re: Revive Fallen Ally (RPG 2.8.1)

Posted: February 2nd, 2013, 5:27 am
by coopziana
Thanks Hirato,

Could you give me an example script as I have no idea how this works, since adding the script I cannot pick the item up anymore with invalid reference "self" and has no "faction".

Re: Revive Fallen Ally (RPG 2.8.1)

Posted: February 2nd, 2013, 8:35 am
by Hirato
inside statuses

Code: Select all

r_status_addscript [
    r_resurrect self
] 100
r_status_addgeneric $STATUS_HEALTH 10 10000 //or whatever your health effect is
EDIT:
This should be the status effect you're assigning to your item you're using to revive the fallen.