Make undead enemies return to life 50% chance?
Dark_Ansem
Member Posts: 992
I'm trying to make a script which will give slain enemies (all undead) in the dungeon a 50% to be restored to life. Problem is, I am not sure how to make the script and how to ensure that creatures do not dissolve. Is that something feasible in NWN?
(I got the idea from Oscuro's Oblivion Overhaul).
(I got the idea from Oscuro's Oblivion Overhaul).
0
Comments
Once the enemy is dead, their heartbeat stops, and any actions or delayed commands you give them will fail. Fortunately, the module or area can resurrect them, on heartbeat or assigned command.
By extension, can I use an ondeathscript directly on creatures to play a special vfx on their death? to ensure players have a little of warning that said monsters aren't going to stay put for long?
void NotDeadYet(object oTarget) { int nHP = GetMaxHitPoints(oTarget); effect eRes = EffectLinkEffects(EffectResurrection(), EffectHeal(nHP)); eRes = EffectLinkEffects(EffectVisualEffect(VFX_IMP_RAISE_DEAD), eRes); ApplyEffectToObject(DURATION_TYPE_INSTANT, eRes, oTarget); } void main() { effect eVFX = EffectVisualEffect(VFX_IMP_DEATH); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, OBJECT_SELF); if (Random(2)) { SetIsDestroyable(FALSE); DelayCommand(6.0, NotDeadYet(OBJECT_SELF)); } else SetIsDestroyable(TRUE); }
You could also add an area variable check for a desecrated area so only though areas have the 50% chance of the undead rising again and not every undead and could be used for quest to consecrate the area by the party and you can remove the variable maker. Need to add a undead check in there also if this going in the general on-death function. Oh and random need a +1 or it 0-2 call.