OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: unkie on 23 May 2003, 14:50:30

Title: detect sound??
Post by: unkie on 23 May 2003, 14:50:30
hi, not too sure how to write it out but basically in my mission i want to have a custom radio msg called "Thunder!" that the player can use, 0-0-1 etc...when he hears the challenge "Flash!" from a friendly unit.. if you know what i mean i was wondering how you would do this so that if the player doesnt respond in a certain time the friendly unit will open fire, i.e if it doenst detect the 'thunder' sound being played...
Title: Re:detect sound??
Post by: Knut Erik on 23 May 2003, 14:56:11
The script should look kinda like this...

_KillTime = 0

#loop
_KillTime = _KillTime + 1
?Respond : goto "End"
_KillTime < 10 : goto "Loop"

YourDude dofire Player
exit

#End
PlaySound "Thunder"
exit