This action gets the loop end position of the given audio and stores it in a variable.
Argument | Description |
---|---|
Sound | The sound asset or playing sound |
Target | The name of the variable in which to store the loop end |
Temp | Whether the target variable should be a temporary variable |
The above action block code first checks if the Space key (vk_space) is pressed. If it is, and no instance of the existing sound asset snd_Loop is playing yet, it is played using the Play Audio action. It is played looped (Loop checked) and the sound instance's ID is stored in an instance variable ins_snd_loop.
Next all properties of the playing sound related to audio looping are stored in instance variables: looping, loop_start and loop_end.
Finally the Show Debug Message action is used to output the values of each of these variables. If loop start and end of the sound asset haven't been changed, it will output:
1
0
0