Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Texture rotation on move?

Mitsuyasi Tiger
Registered User
Join date: 14 Nov 2005
Posts: 3
04-22-2006 18:02
Alright i've got a script that plays a sound - how could I also make it rotate the texture as the AV moves?

default {

state_entry() {
llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);

}


state_exit() {
llReleaseControls();
}

run_time_permissions(integer perm)
{
if (perm)
{
llTakeControls(CONTROL_FWD | CONTROL_BACK, TRUE, TRUE);
}
}

timer() {

llSetTimerEvent(0);
}

control(key driver, integer level, integer edges)
{
if((llGetAgentInfo(llGetOwner()) & AGENT_FLYING) == FALSE)
{
if (level & CONTROL_FWD)
{

llPlaySound("soundwav",1);
}
if (level & CONTROL_BACK)
{
llPlaySound("soundwav",1);

}
}}
}

help would be appreciated ^^
Mitsuyasi Tiger
Registered User
Join date: 14 Nov 2005
Posts: 3
NeverMind
04-22-2006 19:53
bebop vox got it :) NeverMind!

default {

state_entry() {
llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);

}


state_exit() {
llReleaseControls();
}

run_time_permissions(integer perm)
{
if (perm)
{
llTakeControls(CONTROL_FWD | CONTROL_BACK, TRUE, TRUE);
}
}

timer() {

llSetTimerEvent(0);
}

control(key driver, integer level, integer edges)
{
if((llGetAgentInfo(llGetOwner()) & AGENT_FLYING) == FALSE)
{
if (level & CONTROL_FWD)
{

llSetTextureAnim(ANIM_ON | SMOOTH | LOOP,ALL_SIDES,0,0,0.0,0,0.95);
llSleep(5);
} else {
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP,ALL_SIDES,0,0,0.0,0,0.0);

}
}}
}