Help with a door script

Post » Sat Jul 26, 2014 8:18 pm

Scriptname MFQdoorscript extends Actor{This Script opens a portcullis on actor death}    ObjectReference Property portcullis  AutoEvent OnDeath(Actor akKiller)     portcullis.SetOpen()EndEvent	 

I have written a script to open a portcullis when an actor dies using the OnDeath event. The script works fine, but I would like to delay the opening of the door a few seconds for a more dramatic effect.

I'm new to scripting and wondering if this can be done. I know you can delay the opening with an activator such as a lever or pull chain but can it be done with script, and how would I go about it. Any help would be appreciated. It took me two evenings just to get it to work as it is.

User avatar
Tyrone Haywood
 
Posts: 3472
Joined: Sun Apr 29, 2007 7:10 am

Post » Sat Jul 26, 2014 7:07 pm

Utility.Wait(2.0) before your .SetOpen() will give you a 2 sec wait.

User avatar
carrie roche
 
Posts: 3527
Joined: Mon Jul 17, 2006 7:18 pm

Post » Sat Jul 26, 2014 10:18 am

Thank you it's been a long day I will try it tomorrow.

User avatar
Hayley Bristow
 
Posts: 3467
Joined: Tue Oct 31, 2006 12:24 am


Return to V - Skyrim