About to pull my hair our rofl.
A) I can get the pose to start, but when its time to stop it, it fails to stop and sometimes gives us "Script trying to trigger animations but PERMISSION_TRIGGER_ANIMATION permission not set".
B) under take control how would I take control where the said person can not move till time releases controls? just not sure what to add in the control event
string animation = "Pose";
trigger()
{
//-- Removed not a problem --
//little hidden code
//-- end of Removed not a problem --
llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);
}
default
{
state_entry()
{
}
run_time_permissions(integer perm)
{
if(PERMISSION_TAKE_CONTROLS & perm)
{
llTakeControls(CONTROL_FWD |CONTROL_BACK |CONTROL_LEFT |CONTROL_RIGHT |CONTROL_ROT_LEFT |CONTROL_ROT_RIGHT |CONTROL_UP |CONTROL_DOWN |CONTROL_LBUTTON |CONTROL_ML_LBUTTON ,TRUE, TRUE);
}
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
list anims = llGetAnimationList(llGetOwner());
if(llListFindList(anims, [llGetInventoryKey(animation)]) == -1)
{
llStartAnimation(animation);
}
}
}
timer()
{
//-- Removed not a problem --
//little hidden code
//-- end of Removed not a problem --
if (amounta == amountb)
{
// Stop the timer.
llSetTimerEvent(0.0);
llStopAnimation(animation);
llReleaseControls( );
}
}
}