Aller au contenu

Photo

Check if Alive


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 650 messages

Hi all. I, uhm, think I have a tricky situation, where the solution could be easy actually. Just not for me. Here it goes.

 

Standard escort quest, battle starts and journal gets updated + notice text to protect the escort (who is a henchman). Btw... I cannot remember... a henchman can be healed, right? But not controlled directly? Anyway,,, forget about this, to the actual question.

 

What I want is that every time one baddie dies to award some xp, provided the escort is still alive. What I think is that I can put a custom OnDeath there, but for the life of me I cannot find a function that checks alive or dead. I can only see under GLOBALS the CREATURE_ALIVE_BOTH etc, which I don't know how or where to use. Thanks in advance :).



#2
kevL

kevL
  • Members
  • 4 061 messages

// * Returns TRUE if oCreature is a dead NPC, dead PC or a dying PC.
int GetIsDead(object oCreature, int bIgnoreDying=FALSE);


#3
andysks

andysks
  • Members
  • 1 650 messages
Well look at that. I searched for alive and not dead :D.

#4
Tchos

Tchos
  • Members
  • 5 054 messages

I'm pretty sure any NPC can be healed by the PC, in the party or not.  I distinctly remember many times in various modules when my cleric would waste a Raise Dead scroll automatically trying to raise a dead body that someone hadn't set as non-resurrectable.  Not even someone who had died in a fight, but just an intentionally-dead (but friendly) NPC placed as a corpse for the PC to search.