Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | AntBagel |
so I have this horror game which I want to play vent sounds(like something is crawling in the vent) when you do something incorrectly. however when i try to do this then its playing the start every tick. I think the problem is that I used _process but idk what to change it to.
this is the code:
func _process(delta):
if GlobalPoints.badpoints >= 1 and GlobalPoints.badpoints < 4:
playmusic()
elif GlobalPoints.badpoints == 4:
playmusicfast()
func playmusic():
AudioPlayer.play()
func playmusicfast():
AudioPlayer2.play()