Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Touch on/off for Rotation Script

Danni Bekkers
Registered User
Join date: 17 Feb 2007
Posts: 74
05-03-2008 10:57
Hi, hopefully my search hasn't missed this already being here somewhere.... but my question is:

I am using a simple rotation script as follows to rotate a piece of furniture. I would like to either amend this script or add a second script so that rotation can be turned on & off by clicking the item. I am a complete scripting noob so would be grateful for help. If any such script is available I am more than happy to buy it if someone can point me in the right direction :)

This is the one I am using, a freebie I think :

default
{
state_entry()
{
llTargetOmega(<0,0,1>,-0.1,1.0);
}

}


Thanks for any help :)
_____________________
DB Designs - Low Prim Outdoor Furniture

Now in our new island store!

http://slurl.com/secondlife/Seaview/84/107/21
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
05-03-2008 11:10
I have posted several examples of simple scripts in the Scripting Library forum here, that open/close or turn things on/off by touch. Check it out.
_____________________

VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240
http://shop.onrez.com/Archtx_Edo
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
Lets do it again
05-03-2008 13:35
CODE

integer onOff;
default {
touch_start(integer num_detected) {
onOff= !onOff;
llTargetOmega( < 1.0, 0.0, 0.0 >, 1.0*onOff, 1.0 );
}
}
_____________________
From Studio Dora
Danni Bekkers
Registered User
Join date: 17 Feb 2007
Posts: 74
05-03-2008 16:49
Thanks for the replies & for the person who IMd in world too :)
_____________________
DB Designs - Low Prim Outdoor Furniture

Now in our new island store!

http://slurl.com/secondlife/Seaview/84/107/21