Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Please Help me out

Dragon Steele
Artist/conservationist
Join date: 3 Jan 2005
Posts: 183
09-09-2005 07:35
Can Some one here Tell me what line to add to a door script to have it shut by it's self after a bit?

Thank you
_____________________
Boycot the spam farms and the ads on them. Ban the spamers from your land. Look for the clocktower network for a blacklist to put on you land that is grid wide.
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
09-09-2005 07:55
Just add a Timer() event (which contains the door close stuff) and the llSetTimerEvent(sec_you_want_open) after the door opens

Make sure you put llSetTimerEvent(0.0) as the last item in your timer event to turn off the timer so it doesn't "close" over and over

(I am VERY new to scripting, so take my advice with a grain of salt, but give that a try :) )


edit: this is assuming a one state script you have to open the door, probably best to have different states for each stage, ie, waiting, open, close. If that's the case you can have the timer event call the close state, which when done goes back to waiting. The timer event is reset upon state change.
Online Doesburg
absurd hero
Join date: 6 Jul 2005
Posts: 53
09-09-2005 09:33
Yep, a timer would work. It's even easier with llSleep(delay) between the opening and closing commands.