) gave me that activated an animation when flying and turned it off when not to make it so it would make something invisible when flying then visible when not. Here's what I tried:integer was_flying;
default
{
on_rez(integer param)
{
llResetScript();
}
state_entry()
{
if(llGetAttached())
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
}
}
run_time_permissions(integer perm)
{
was_flying = llGetAgentInfo(llGetOwner()) & AGENT_FLYING;
if(was_flying)
{
llSetAlpha(ALL_SIDES);
}
else
{
llSetAlpha(0,ALL_SIDES);
}
state active;
}
}
state active
{
on_rez(integer param)
{
llResetScript();
}
state_entry()
{
llSetTimerEvent(0.5);
}
timer()
{
integer now_flying = llGetAgentInfo(llGetOwner()) & AGENT_FLYING;
if(was_flying)
{
if(!now_flying)
{
llSetAlpha(ALL_SIDES);
was_flying = now_flying;
}
}
else
{
if(now_flying)
{
llSetAlpha(0,ALL_SIDES);
was_flying = now_flying;
}
}
}
}
Keep in mind I know little to nothing about scripts, so if the problems obvious, or if the whole llSetAlpha method wouldn't work at all anyways, don't hurt me!

