CODE
llSetMessageQueueLength( iMessageType, iQueueLength);
You'd use this to remove message queuing for a particular message type so that you only process messages as they arrive, in real-time.
Message-type is MESSAGETYPE_LISTEN, MESSAGETYPE_LINKMESSAGE, MESSAGETYPE_CONTROL, MESSAGETYPE_SENSOR and MESSAGETYPE_TOUCH.
Examples of where you'd use this:
You have a FireControl script in a primary prim, that sends linkmessages such as "FIRE" to linked gun prims.
If you try this in practice right now, if you send the FIRE messages fast enough, they get queued up by the guns - which cant process them fast enough - and the gun continues to fire for many seconds after you release the trigger.
By setting llSetMessageQueueLength( MESSAGETYPE_LINKMESSAGE, 1 ); within the gun prim script, it'd just dump new linkmessages if they arrive while it's processing an earlier one.
Similarly, if you have a vehicle with wheels, you're probably sending "SETROT" linkmessages to the wheels. SetRot in a subprim takes a certain amount of time, so you can see the vehicles continuing to move around pseudo-randomly for many seconds after you stopped steering.
Same solution: put a llSetMessageQueueLength( MESSAGETYPE_LINKMESSAGE, 1 ); in the wheel script.
Last example: a lift which receives touch_start events. You dont want them queued, so you set llSetMessageQueueLength( MESSAGETYPE_TOUCH, 1 );
Azelda