If Audio Is Playing Icon If Audio Is Playing

This action can be used to check whether an instance of any sound resource is currently playing in your game. You give the sound resource to check for from the asset explorer and the function will return true if it is playing and false if it is not, although if you check the "not" flag, this is reversed and the function will return true if the sound is not playing and false otherwise.

Note that to add actions into the "if" block, they should be dropped to the side of the action, as shown in the image below:

If Audio Is Playing drop actionsThese actions will now be run if the "if" evaluates to true, while any actions dropped elsewhere will be performed after the "if" block.

 

Action Syntax:

If Audio Is Playing Action

Arguments:

ArgumentDescription
SoundThe sound resource to check

 

Example:

If Audio Is Playing ExampleThe above action block code checks to see if the given sound is currently being played and if it is, it stops it.