In my vehicle script, I have the left mouse button mapped to a specific vehicle capability. When the mouse button is held down, the vehicle will rotate along the Z axis, when the mouse button is released, the vehicle is supposed to return back to it's default banking behavior.
This is a snippet of the code :
if((level & CONTROL_ML_LBUTTON) && (edge & CONTROL_ML_LBUTTON))
{
tail_rotor_lock=TRUE;
}
else if(!(level & CONTROL_ML_LBUTTON) && (edge & CONTROL_ML_LBUTTON))
{
tail_rotor_lock=FALSE;
}
if((level & CONTROL_LBUTTON) && (edge & CONTROL_LBUTTON))
{
tail_rotor_lock=TRUE;
}
else if(!(level & CONTROL_LBUTTON) && (edge & CONTROL_LBUTTON))
{ tail_rotor_lock=FALSE; } }
The system does not seem to be detecting the release of the mouse button. Unchecked the MONO box to compile on the older LSL VM and worked perfectly as it was intended. It does not appear to be the basic boolean as it does the detect of the mouse button being pressed ok, it appears only when the mouse button is let go. I added a basic llWhisper() to each of the events to verify, functioning as described, the script is detecting the press but not the release of the mouse button.
Snippet of the modified code:
if((level & CONTROL_ML_LBUTTON) && (edge & CONTROL_ML_LBUTTON))
{
tail_rotor_lock=TRUE;
llWhisper(0,"pressed mouse button!");
}
else if(!(level & CONTROL_ML_LBUTTON) && (edge & CONTROL_ML_LBUTTON))
{
tail_rotor_lock=FALSE;
llWhisper(0,"Let Go mouse button!");
}
if((level & CONTROL_LBUTTON) && (edge & CONTROL_LBUTTON))
{
tail_rotor_lock=TRUE;
llWhisper(0,"pressed mouse button!");
}
else if(!(level & CONTROL_LBUTTON) && (edge & CONTROL_LBUTTON))
{ tail_rotor_lock=FALSE; llWhisper(0,"Let Go mouse button!"); } }
The only whispers I receive are the ones to alert of the pressing of the mouse button.
SVC-1342), rather than incorrect values being returned to the control event.