When a message sent by MessageGroup causes a new handle to be generated (e.g., Create, BeginSound) that would have been passed back to the client had the client sent the message, that handle is stored temporarily with the MessageGroup. Subsequent messages in that MessageGroup can refer to this handle with the *? symbol. This handle is remembered only while processing the current data array; it's replaced each time a new handle is generated. So to create a handler and send it message Foo with arguments from a data array, one could use the following messages:
AddMessage hMG BeginSound hGenerator; AddMessage hMG Foo *? *1 *3;Every time an array is sent to this MessageGroup, a new handler is created for hGenerator, and the message Foo is sent to the new handler with the second and fourth array elements as arguments.
To use MessageGroups, load msgGroup.so and create an actor of type MessageGroup. MessageGroups are also used in the AUDupdate mechanism.
Special note for AUDupdate: other actors can also use the *1 *3 kind of notation to access the values of the data array passed to a message group via AUDupdate, even if those actors are not themselves MessageGroup actors. In this case, *3 for example refers to the fourth argument of the last AUDupdate sent to any message group at all. Use this with care: you might not realize that another AUDupdate happened in the meantime which clobbered the datum you needed. Or there might have been fewer than four elements in the AUDupdate array to begin with.
New abbreviation: anywhere you can write *2 *3 *4 *5 *6, you can replace that with *2 to *6. Also, *$ in this context (*0 to *$, *1 to *$, etc.) means the last parameter passed in from AUDupdate. You can use this to work with messages with an unknown or variable number of parameters.