Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Going back to original rotation once script is reset?

woofbag Fudo
Registered User
Join date: 3 Aug 2006
Posts: 31
12-18-2007 18:14
Hello, I'm making an auto turret (Don't worry, it's anti-abuse, no more than 5 in one area at once, won't rez in non-combat areas and Lindens get full access to the menus) and so far it's coming out pretty good, but I'm trying to make it so once the script is reset (via the "Reset" menu button) or the firing mode is turned off (via the "Hold Fire" menu button), it goes back to its original rotation of when it was rezzed, and I'm at a loss. Can anyone help?
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
12-18-2007 18:46
Something like this?:

CODE

default
{
state_entry()
{
llSetRot((rotation)llGetObjectDesc());
}
on_rez(integer start_param)
{
llSetObjectDesc((string)llGetRot());
}
}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
woofbag Fudo
Registered User
Join date: 3 Aug 2006
Posts: 31
12-18-2007 19:16
hm... So that would rotate the object when it resets to what the description was set to when it rezzed? Clever, I'll try it, thanks.