How do you make a door open when when you kill an enemy?

Post » Wed Jun 20, 2012 1:16 pm

Hi im using the ambush drauger set up at the moment does any one know
how i could make a door open when the enemy is killed.

Im thinking of an ondeath script maybe but i dont know alot about scripting.

Please be simple, can some one help me? thanks!
User avatar
Zosia Cetnar
 
Posts: 3476
Joined: Thu Aug 03, 2006 6:35 am

Post » Wed Jun 20, 2012 6:59 am

Put a script on the door (which should be locked and "requires Key" initially) like this:

Actor Property KeyMob Auto ; The enemy you want the door to open after it diesBool property Polling=False AutoEvent OnCellLoad()   if !Keymob.IsDead() && !Polling	  Polling = True	  RegisgterForUpdate(1)   endifEndEventEvent OnUpdate()   if Keymob.IsDead()	 Unlock()	 Open()	 UnregisterForUpdate()   EndifEndEvent

what that does is, every second, it checks if the target mob is dead. If it is, it unlocks, opens, and stops checking.
User avatar
Javier Borjas
 
Posts: 3392
Joined: Tue Nov 13, 2007 6:34 pm

Post » Wed Jun 20, 2012 10:27 am

Ok brillant thank you very much! oh and
this is what it will be for if your interested.
http://www.gamesas.com/topic/1361374-skyrim-horde-mode-a-mod-in-progress/
User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am


Return to V - Skyrim