Get Audio Loop End Icon Get Audio Loop End

This action gets the loop end position of the given audio and stores it in a variable.

 

Action Syntax:

Get Audio Loop End

Arguments:

ArgumentDescription
SoundThe sound asset or playing sound
TargetThe name of the variable in which to store the loop end
TempWhether the target variable should be a temporary variable

 

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