02-18-2013, 02:59 AM
example 1
example 2
PHP Code:
integer on = TRUE;
default
{
touch_start(integer y)
{
if(on == TRUE)
{
llSetPos(llGetLocalPos()+<0,0,0.45>);
llPlaySound("c416996b-38f2-dfb1-a5db-a0752ffb7acf",1.0);
on = FALSE;
}
else if(on == FALSE)
{
llSetPos(llGetLocalPos()-<0,0,0.45>);
llPlaySound("034a1292-3445-f08a-2f04-0a2d78459f80",1.0);
on = TRUE;
}
}
}
example 2
PHP Code:
integer on = TRUE;
default
{
touch_start(integer y)
{
if(on == TRUE)
{
llSetPos(llGetLocalPos()+<0,0,2>);
on = FALSE;
}
else if(on == FALSE)
{
llSetPos(llGetLocalPos()-<0,0,2>);
on = TRUE;
}
}
}