Description :
This instruction assigns a sound play to the current key.
Parameters :
-
Index of the action. Valid in the range [1, number of actions].
-
Frame of the sprite, valid in the range [1, number of frames].
-
ObjectID of the sound object.
-
Automatic channel selection :
CHANNEL_FREE
Or channel number (you MUST use different channels if you want to play sounds simultaneously) :
CHANNEL_1
CHANNEL_2
CHANNEL_3
CHANNEL_4
CHANNEL_5
CHANNEL_6
CHANNEL_7
CHANNEL_8
CHANNEL_9
CHANNEL_10
CHANNEL_11
CHANNEL_12
CHANNEL_13
CHANNEL_14
CHANNEL_15
-
SOUND_LOOP (the sound is played in a loop)
SOUND_ONE_SHOT (the sound is played once)
Notes :
For objects with frame animation (video, animated GIF), the event will be assigned to a specific frame.
For Sprites, the event will be assigned to a specific frame and to a specific action.
There is no limit to the number of events that can be assigned to a specific key.
The procedure managing the events takes only one parameter: the sequence ObjectID.
The current key gets defined with the instruction track.key.set ().
Examples :
|