Pseudocode: If a collide with b then playsound
After setting up collisions you can check if an entity collide with another by calling entitycollided. If you want a sound to be in a specific area then you must check if the player is in the area.
Pseudocode:
If player in area
If sound not playing play sound
Else
If sound playing stop sound
End If
After setting up collisions you can check if an entity collide with another by calling entitycollided. If you want a sound to be in a specific area then you must check if the player is in the area.
Pseudocode:
If player in area
If sound not playing play sound
Else
If sound playing stop sound
End If