Checking whether an actor is dead in other actor's script

Post » Thu Sep 18, 2014 3:59 am

Hello everyone,

as you might have guessed (if you understood what i meant in the title of the thread), I am quite new to scripting and modding in general. I have been doing little things here and there since Fallout 3 but never got too deep into scripting.

The situation I have is 2 npcs who tell you to kill the other one. Once you do it, you will have to kill the last one since he lied to you etc etc. So, in order to change the quest stage correctly I wanna check inside the scripts inside the actors whether the other one is dead or not.

Could I do that or do I have to check all that in a script inside the quest itself?

User avatar
Everardo Montano
 
Posts: 3373
Joined: Mon Dec 03, 2007 4:23 am

Post » Wed Sep 17, 2014 3:07 pm

Is each actor's script already tracking when the death of the actor occurs? If so, all you need to do is make a new bool property isActorDead that is false by default, and gets set to true when the actor dies. Then all other scripts that need to check for that variable simply access it via YourActorScript.isActorDead

User avatar
Erika Ellsworth
 
Posts: 3333
Joined: Sat Jan 06, 2007 5:52 am


Return to V - Skyrim