Rhiannon Arkin Posted October 13, 2017 Share Posted October 13, 2017 Hi I'm stuck thinking. I am trying to use the control event to trigger animations for a weapon. (left mouse down+ control key). But obviously that takes away the control over the avi. Is there a way to have the regular key input plus whatever i want to do by taking away the controls. Like triggering the weapon AND still moving forward as before. ?? thanks R. Link to comment Share on other sites More sharing options...
Rhiannon Arkin Posted October 13, 2017 Author Share Posted October 13, 2017 ok never mind. I just found the flag in the llTakeControl command. I had it set to FALSE for the pass_on. Link to comment Share on other sites More sharing options...
Rolig Loon Posted October 13, 2017 Share Posted October 13, 2017 24 minutes ago, Rhiannon Arkin said: I just found the flag in the llTakeControl command. I had it set to FALSE for the pass_on. Right. If that last parameter is TRUE, your normal movements apply. So you can write something like this ... default { state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS); } 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); } } control(key id, integer level, integer edge) { if( ( CONTROL_LBUTTON & level & edge) || (CONTROL_ML_LBUTTON & level & edge) ) { llOwnerSay("Swing weapon"); } } } Link to comment Share on other sites More sharing options...
Rhiannon Arkin Posted October 14, 2017 Author Share Posted October 14, 2017 yes, thanks that works. All good. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now