Hi all!
Based on a script i found here, i modified a script to do the following: when player press "F" the player will hear a sound.
But I have a problem. During the key is pressed the game plays the sound rapidly again and agin. Is it possible to play the sound only once and force the player to press button again to hear the sound?
I tried to solve this with a timer:
;Artificial Intelligence Script
;Header
desc = Play Zombie sound when "F" key is pressed
;Triggers
:state=0:state=1
:state=1,scancodekeypressed=33:timerstart,state=2
:state=2,timergreater=700:sound=audiobank\voices\male\hurt1.wav,state=0
;End of Script
This worked, but not the best, because sound delayed after key pressed.
Has anybody a solution for this without timer?