A question or two.

Go down

A question or two. Empty A question or two.

Post by Angel of Death on Sun Apr 22, 2012 4:57 pm

Hi,

I was asked a question by a friend recently which left me kinda blank in how to response; really don't know how to do what he wanted. So, I got the brilliant idea to ask here, hoping someone might know the answer. Smile

How does one make a NPC appear dead in an area; as in, spawn in dead on the ground and stays that way - permanently?

(I know the creature in question likely need the "Leaves lootable corpse" checked in properties, but after that I'm kind of blank. Suspect )
Angel of Death
Angel of Death
Epic Level
Epic Level

Number of posts : 1131
Age : 404
Location : Europe
Main Character : CÚlestin Chevalier; Knight Champion of Dalix. Protector of the Innocent. Slayer of Evil.
Other Character : Angelique Nightstar; Arcane Archer.
Personal Quote: "The way of the bow is simplicity and beauty combined with power and discipline."
Other Character. : Bruce Li; Wanderer and Practitioner of the Dragon Paw Style. & Cherry; Starchild of Jewel n' Chancetaker of Lysis.
Other Character.. : Anna, Weaver of Illusions. - You can read about all of them following this link to their Biographies! =)
NWN Username : I await You in the End
Time Zone : Central European Timezone
Registration date : 2010-12-11

View user profile

Back to top Go down

A question or two. Empty Re: A question or two.

Post by RustyDios on Sun Apr 22, 2012 5:54 pm

On the (custom) spawn in script have a bit that goes along the lines of;
EffectDamage(OBJECT_SELF, GetMaxHitpoints(OBJECT_SELF) );

Basically an auto-kill line.. with the flag "leaves lootable corpse" set ..... although it's been aaaggggeeesss since I last done any NWN scripting so my syntax and actual commands may be slightly wrong... and this might not even work....

Alternatively use a placeable corpse ? There are hundreds of "dead things" in the battlefield sections ?... set the dead placeable corpse to have an inventory and voila a dead corpse chest.... ...

Could try manually setting the Creatures HP to -1... that might work too...


Just throwing out ideas, but my guess is you'll need something like option A .....

Good Luck Smile
RustyDios
RustyDios
High Epic Level
High Epic Level

Male Number of posts : 2270
Age : 34
Location : England // Getting lost in Aenea
Main Character : Jay Braysin, The Wandering Shadow, Protector of Nektaria, Talon's Eternal Foe
Other Character : Shouri Braysin, The Shimmerstar's Moonlight Sorceress
Other Character. : Grace Fularras, Walking Library , Cleric of Mystara
Other Character.. : See my sig ... And here too ...
NWN Username : RustyDios
Time Zone : GMT (England, DST)
. : A question or two. Forum_donor
Registration date : 2008-07-28

View user profile

Back to top Go down

A question or two. Empty Re: A question or two.

Post by eeriegeek on Sun Apr 22, 2012 10:33 pm

There may be some overkill in here but this has worked for me placed in the creature's onSpawn event hander.
Code:
SetIsDestroyable(FALSE,FALSE,FALSE);
effect eDamage = EffectDamage(GetCurrentHitPoints(OBJECT_SELF)+10,DAMAGE_TYPE_MAGICAL);
effect eDeath = EffectDeath();
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,OBJECT_SELF);
eeriegeek
eeriegeek
Worldly Guide
Worldly Guide

Number of posts : 244
Age : 49
Main Character : Amaerillie
Other Character : K'az T'anii
Other Character. : Xephod
Other Character.. : Eg'bo
NWN Username : eeriegeek
Time Zone : GMT-4
Registration date : 2009-09-20

View user profile

Back to top Go down

A question or two. Empty Re: A question or two.

Post by Angel of Death on Mon Apr 23, 2012 11:44 pm

Oh, I see. So I hadn't aimed that far from the target in my initial try.

Thank you very much both of you for the quick response, very much appreciated! Smile
Angel of Death
Angel of Death
Epic Level
Epic Level

Number of posts : 1131
Age : 404
Location : Europe
Main Character : CÚlestin Chevalier; Knight Champion of Dalix. Protector of the Innocent. Slayer of Evil.
Other Character : Angelique Nightstar; Arcane Archer.
Personal Quote: "The way of the bow is simplicity and beauty combined with power and discipline."
Other Character. : Bruce Li; Wanderer and Practitioner of the Dragon Paw Style. & Cherry; Starchild of Jewel n' Chancetaker of Lysis.
Other Character.. : Anna, Weaver of Illusions. - You can read about all of them following this link to their Biographies! =)
NWN Username : I await You in the End
Time Zone : Central European Timezone
Registration date : 2010-12-11

View user profile

Back to top Go down

A question or two. Empty Re: A question or two.

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum