Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Play sound at random time intervals
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Play sound at random time intervals (Read 524 times)
0 Members and 1 Guest are viewing this topic.
Pr0ph3t
Members
Play sound at random time intervals
«
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
«
Last Edit: 27 Mar 2005, 20:55:25 by Pr0ph3t
»
Logged
Silencer
Guest
Re:Play sound at random time intervals
«
Reply #1 on:
27 Mar 2005, 22:16:04 »
I have made a script, that u have a random number 1,2,3,4 or 5
And what do you want then?
Logged
Artak
The old beanbag shaker
Former Staff
You want to talk about it, yes?
Re:Play sound at random time intervals
«
Reply #2 on:
27 Mar 2005, 22:52:31 »
#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.
«
Last Edit: 27 Mar 2005, 22:53:29 by Artak
»
Logged
Not all is lost.
Pr0ph3t
Members
Re:Play sound at random time intervals
«
Reply #3 on:
28 Mar 2005, 03:46:04 »
Yeah ok. I admit it, it was lazy.. I've downloaded like every tutorial in existence.
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Play sound at random time intervals
Top of page