Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Make undead enemies return to life 50% chance?

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).

Comments

  • ProlericProleric Member Posts: 557
    edited March 2018
    You can control this via the SetIsDestroyable settings on spawn.

    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.

  • Dark_AnsemDark_Ansem Member Posts: 937
    Proleric said:

    You can control this via the SetIsDestroyable settings on spawn.

    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.

    I did think of assigning this to Area heartbeat! but wasn't aware of that function. Thank you kind sir. I'll try experimenting on it a little.

    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?

  • squattingmonksquattingmonk Member Posts: 58
    edited March 2018
    Yes, you can use the OnDeath slot to apply the VFX. You can also use it to resurrect them:
    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); }

    Dark_Ansemdunahan
  • ShadowMShadowM Member Posts: 503
    edited March 2018
    You can also add a text float above the undead like (You see some dark energy envelope the undead and sense that it destruction is only temporary inside the notdeadyet call)
    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.

    Dark_Ansem
  • FaerûnFaerûn Member Posts: 36
    Any luck with this @Dark_Ansem? I think it's a really great idea, one that I was curious about when I tried the Diablo sever out a few days ago.

    Dark_AnsemSweetness
  • Dark_AnsemDark_Ansem Member Posts: 937
    Faerûn said:

    Any luck with this @Dark_Ansem? I think it's a really great idea, one that I was curious about when I tried the Diablo sever out a few days ago.

    I'm out of the country so I cannot test this until a couple weeks ahead. I'm gathering information so that I may test it asap.

    Sweetness
  • Dark_AnsemDark_Ansem Member Posts: 937
    So, after a massive breakdown of my hardware (Premium warranty MY ARSE) I am back and I can say, I think this needs tweaking, as I am not sure this works as intended.

  • ShadooowShadooow Member Posts: 343
    there is creature in CEP that does exactly this, Restless Skeleton

  • Dark_AnsemDark_Ansem Member Posts: 937
    Shadooow said:

    there is creature in CEP that does exactly this, Restless Skeleton

    oooh, time to reinstall then...

  • Dark_AnsemDark_Ansem Member Posts: 937
    Shadooow said:

    there is creature in CEP that does exactly this, Restless Skeleton

    have you had any chance to test this?

Sign In or Register to comment.