I've been attempting to script custom holding and aim animations into some weapons that I've modeled. I am up to speed on how to detect whether or not I'm in mouselook (do llGetAgentInfo on yourself), however my problem is that there is apparently no way for LSL to know when to do this check, because the actual activity of entering and exiting mouselook is mysteriously missing from LSL.
I've noticed in the average weapon script that somewhere between obtaining permissions (run_time_permissions event) and firing the weapon (control event) there seems to be a "hole" in the code where nothing is really happening, and it is in that "hole" that an agent enters and exits mouselook. Therefore, my question is this: is there any event that can be handled within the script regarding the entering or exiting of mouselook?
The only idea that I can come up with (haven't tried it yet) is making the script state-oriented and putting it into a "holding" state after permissions are set which constantly loops through the mouselook check, changing to an "aiming" state when mouselook is detected, then looping again to detect when mouselook is no longer active, whereupon the state is changed back to "holding".
If anybody has any ideas on this matter, I'd love to hear them, and I'll be trying the above state-oriented approach later this afternoon.
