Hi all. I had this issue today which I didn't see it coming but it's actually quite clear. Bear with me.
The creature dies. And an NPC spawns and starts talking. All happens as it's supposed to, with one exception. Thing is, that the hostile creature will resurrect if we don't destroy some pillars around first. See the problem? If we don't destroy the pillars, the creature will resurrect but the NPC will spawn nonetheless which doesn't make sense. Here's the OnDeath script as it looks now. Any work around?
#include "ginc_ipspeaker"
void main()
{
object oPC = GetFirstPC();
object oMessenger = GetObjectByTag("c_roe_sanitmess");
object oWP = GetObjectByTag("wp_spawn_messe");
object oBeh = GetObjectByTag("c_roe_sanit_beh");
location locMess = GetLocation(oWP);
if(GetIsDead(oBeh, FALSE))
{
CreateObject(OBJECT_TYPE_CREATURE, "c_roe_sanitmess", locMess, 0, "");
CreateIPSpeaker("c_roe_sanitmess", "sanit_last_convo", locMess, 1.5f);
}
else
{
}
}
PS: I added the if condition just now and haven't tested it yet. I assume it will work for it checks if the creature is dead. If it resurrects it won't return TRUE. But it happens fast and I don't know how to add a delay to the CreateObject. I think this should solve it if possible. Will ActionWait work here?
Thanks a lot in advance.





Retour en haut






