Get Audio Loop Start Icon Get Audio Loop Start

This action is used to get the start point of the audio's loop.

 

Action Syntax:

Get Audio Loop Start

Arguments:

ArgumentDescription
SoundThe sound resource
TargetThe name of the variable in which to store the state
TempWhether the target variable should be a temporary variable (Declare Temp)

 

Example:

Set Audio Pitch ActionThe 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