Another NPC Statue

Information and Discussion Relating to NWN2 Scripting and Coding

Moderators: Moderator, Developer, DM

Yawgnor
Posts: 58
Joined: Sat May 16, 2009 1:21 pm
Location: Coatesville, PA

Another NPC Statue

Unread post by Yawgnor »

Not wanting to hijack 7threalm's similar post, I have a slightly different question, and a request.

I am trying to have a NPC statue come to life and attack when the sarcophagus she is guarding is opened. So far I was able to turn her into a statue, and when the sarcophagus is opened she does come to life. Thing is, even though she is set to hostile, she won't attack. I cannot figure out what I'm missing.

Two other roadblocks are, one, the stance she's frozen into; I want it to look like this:
Image
(She's the pretty one on the left.)
To get that, I have to add:

Code: Select all

// Apply the death effect
ApplyEffectToObject( DURATION_TYPE_PERMANENT, EffectDeath(), OBJECT_SELF );
But her falling to the ground dead when I open the sarcophagus isn't quite what I need.

When I remove that effect though, I get this:
Image
(Again, she's the pretty one on the left.)
Looks a little too lazy for a fierce statue. How do I get around this?

Lastly, the next roadblock is the collision ball to keep people from stepping through her; I cannot get it to resize small enough for a character to stand anywhere near her. Any solutions there?

Now, for this to all makes sense, I'd need someone to take the time and actually look at my guardian and her scripts (plus the script in the sarcophagus) in the toolset. It's just the mod, erf, and 2 haks.


I promise that if somebody is able to help me fix this, I'll stop pestering you all for a whole month (minus any auctions selling something I need). You have my word on that.
Jorn (the Hideous) Odgerson
Luna
Retired Admin
Posts: 7945
Joined: Sat May 16, 2009 3:00 pm

Re: Another NPC Statue

Unread post by Luna »

Maybe because of effectdeath?
I can't quite remember if that kills the NPC

One of our scritps does this. I don't know if it's the only one.
You would put this on the OnSpawn Event Script.



void spawnInStatue(object oPC)
{
ApplyEffectToObject( DURATION_TYPE_PERMANENT, EffectPetrify(), oPC);
SetPlotFlag( oPC, 1);
SetBumpState(oPC, BUMPSTATE_UNBUMPABLE);
SetCustomHeartbeat( oPC, 500000);
}

void main()
{
DelayCommand(6.0, spawnInStatue(OBJECT_SELF));
}
Yawgnor
Posts: 58
Joined: Sat May 16, 2009 1:21 pm
Location: Coatesville, PA

Re: Another NPC Statue

Unread post by Yawgnor »

That is so cool!... Anyways, you're almost rid of me for the month. And no. I'm not happy about that. I happen to love you kids. Platonically. But I know that to get what I need, sometimes I have to give what the other wants. Even if it hurts.

She does not have the frozen stance I'd wish for, but I'm able to live with that. She comes to 'life' and attacks, but I'm not able to cause damage when fighting her. I need to be able to kill her sooner or later.

Luna, thank you for this huge step helping me towards my goal.
Jorn (the Hideous) Odgerson
User avatar
Duster47
Retired Staff
Posts: 3727
Joined: Mon Nov 16, 2009 7:57 pm
Location: Florida, USA

Re: Another NPC Statue

Unread post by Duster47 »

How about use one frozen NPC for the statue. It then despawns (DestroyObject(oStatue)) and is replaced by a live version of the same thing. Place a WP for a Spawn location.
PC1 = Nerys, Emissary and Skald of the Greyfox tribe, last seen roaming north near Secomber
PC2 = Valqis Sanejmeh; far away cartographer, Oracle of Nut at chaltin QulDaq, former navigator of the Sea Seeker, Reader of Candlekeep and sometime performer.
Vekin
Posts: 26
Joined: Sun May 24, 2009 1:53 pm
Location: England

Re: Another NPC Statue

Unread post by Vekin »

There used to be a set of gargoyles on the vault that would come to life when you got close, maybe if you take alook at them it will help you.
Yawgnor
Posts: 58
Joined: Sat May 16, 2009 1:21 pm
Location: Coatesville, PA

Re: Another NPC Statue

Unread post by Yawgnor »

Yawgnor wrote:She comes to 'life' and attacks, but I'm not able to cause damage when fighting her. I need to be able to kill her sooner or later.
I figured it out, it was the line setting the guardian to "plot". She works almost perfectly now (but only if there's one guardian statue).

As per my offer, you'll not hear from me again (unless an auction has something I need) until the 12 of March.

Hope you all have a great month. :)






BTW, just because none here on the forums will have to suffer me bugging them for the month, that does not mean I won't still be playing the game.
Jorn (the Hideous) Odgerson

Return to “NWN2 Scripting”