Need help making all NPC's in a city become unconscious

Post » Mon Nov 19, 2012 6:28 pm

Hey guys,

I have an idea for a quest where all NPC's in a city become unconscious when my quest stage hits X, and I want them to be back up and acting completely normal as soon as stage Y drops.

How would I go about doing this?

I have no doubt it would be quit extensive, and this is my first quest ever, but I appear to be doing well so far and the quest is already fairly large and complicated. I'm just excited to get this going.

Thanks for any and all help!

Edit: Would it be easier to have two copies of each NPC in the town, and have one load dead, then alter the UI interactions to say that they are unconscious. Then replace them with the living NPC's at the next stage?
User avatar
Breanna Van Dijk
 
Posts: 3384
Joined: Mon Mar 12, 2007 2:18 pm

Post » Mon Nov 19, 2012 8:38 am

I'm not very good at scripting and don't know if there's a better way to do this, but you can put all the NPC on aliases and call this function for each one, and you only have to change the flag from true to false when you want NPC to behave normally again.



Function SetUnconscious(bool abUnconscious = true) native
User avatar
Mario Alcantar
 
Posts: 3416
Joined: Sat Aug 18, 2007 8:26 am

Post » Mon Nov 19, 2012 7:16 pm

I'm not entirely sure, but I think flagging people as unconscious doesn't actually knock them out.
What you could do is register each one to get into an alias that has an AI package that makes them go to sleep in a bed. It would probably be a SleepTarget package.
User avatar
Nick Pryce
 
Posts: 3386
Joined: Sat Jul 14, 2007 8:36 pm

Post » Mon Nov 19, 2012 9:28 am

Or paralyse them with a magic effect ability.
User avatar
Jenna Fields
 
Posts: 3396
Joined: Mon Dec 11, 2006 11:36 am

Post » Mon Nov 19, 2012 5:21 am

I think what I ended up doing is having a copy of each actor, that is dead on load. Their inventories are disabled, and a message appears on activation saying that they are "Still breathing, but appear to be in a deep sleep."

Then when a stage is set, these dead actors are removed, and possibly removed from the body clean up False faction. Then the living versions of the characters are teleported in from a secret room to begin acting.

Might be messier, but seems like a working work-around.
User avatar
Jessica Thomson
 
Posts: 3337
Joined: Fri Jul 21, 2006 5:10 am


Return to V - Skyrim