//code
key owner;
integer status;
initialize()
{
llSay(0, "initializing..."
;llSetTimerEvent(.1); //honestly you could make this shorter, but what would be the point? .5 seems to work nice.
owner = llGetOwner();
status = 0;
}
default
{
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
if(llGetOwnerKey(owner) == llGetOwner())//checks to see if we have changed owner
{
llStartAnimation("PistolHold"
; initialize();
}
}
on_rez(integer total_number)
{
if(llGetOwner() != owner)
{
initialize();
}
}
timer()
{
if (llGetAgentInfo(owner) & AGENT_MOUSELOOK)
{
llStopAnimation("PistolHold"
;llStartAnimation("PistolFire"
;}
else
{
llStopAnimation("PistolFire"
;llStartAnimation("PistolHold"
;}
}
}
//end code