OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pr0ph3t on 27 Mar 2005, 20:55:09
-
Hello again ;D
I would like to make a quick little script (or trigger if possible but I doubt it) that plays a sound at different time intervals. What I mean by this is the following (steps)
1. Randomly selects a value between 1-5.
2. Plays the sound sample after randomly elapsed time (1-5seconds)
3. loop
I hope I explained myself correctly..
Sounds really easy to do
-
I have made a script, that u have a random number 1,2,3,4 or 5
And what do you want then?
-
#loop
_delay = random 5
?_delay < 1: goto "loop"
~_delay
playsound "mysound"
goto "loop"
or
#loop
_delay = (random 4) +1
~_delay
playsound "mysound"
goto "loop"
It IS really easy to do. Now you should head on over to the editors depot and get some tutorials ect. learning material and learn how to do it yourself. Then when you get errors, have us fix them, instead of writing the whole thing. ;)
-
Yeah ok. I admit it, it was lazy.. I've downloaded like every tutorial in existence.