Page 1 of 1

script for school bel

Posted: Sun May 28, 2006 11:38 am
by Bassie_w
I think that this is asked earlier, but I couldn't find it.
For the map of my school I want a script for the school bel.
After 5 minutes when the map has started you hear the school bel, then after 20 minuten then after 5 minuten.
Like this:
*Start*
*5 minutus*
*school bel*
*20 minuten*
*school bel*
*5 minutes*
*schoolbel*
etc.

I want that everyone can head it?
Has anybody got a script for that?
Thank you!

Re: script for school bel

Posted: Sun May 28, 2006 9:01 pm
by Ophisâ„¢
Bassie_w wrote:I think that this is asked earlier, but I couldn't find it.
For the map of my school I want a script for the school bel.
After 5 minutes when the map has started you hear the school bel, then after 20 minuten then after 5 minuten.
Like this:
*Start*
*5 minutus*
*school bel*
*20 minuten*
*school bel*
*5 minutes*
*schoolbel*
etc.

I want that everyone can head it?
Has anybody got a script for that?
Thank you!
I find it funny you took 3 attemps at spelling "minutes" right.

Posted: Mon May 29, 2006 3:15 am
by Green Beret
Yea it can be done, But finding someone with time to post the script is another thing.

Maybe search for randomint


if (randomint(4) == 0) {
first bell
second bell
3rd bell

If your not worried about makin them go off at them same minutes every time then, randomint Isnt what you want.

Posted: Mon May 29, 2006 2:32 pm
by At0miC

Code: Select all

main:

local.master = spawn ScriptMaster
local.master aliascache schoolbellsound sound/xxx/xxx.wav soundparms 1.0 0.0 1.0 0.0 1024 6000 auto loaded maps "m dm moh obj " // values are up to you.


level waittill spawn

thread schoolbell

end

schoolbell:

wait 300 //(5 mins)
$speaker playsound schoolbellsound
wait 1200 //(20 mins)
$speaker playsound schoolbellsound

goto schoolbell

end
In your map you should have a speaker with targetname 'speaker' or whatever u like, if u wanna use a speaker that is.

Posted: Tue May 30, 2006 4:43 am
by Green Beret
Nice way to simplify it :wink:
I was thinkin if statements and everything else :shock:


I think too much some times :roll:

Posted: Tue May 30, 2006 6:45 pm
by Bassie_w
At0miC wrote:

Code: Select all

script for the schoolbell
In your map you should have a speaker with targetname 'speaker' or whatever u like, if u wanna use a speaker that is.
Thank You At0mic.. Of zoals nederlanders het zeggen: Dankjewel At0miC!

Snake? wrote:I find it funny you took 3 attemps at spelling "minutes" right.
I thought that one of the 3 has to be good ;)

Posted: Tue May 30, 2006 6:55 pm
by At0miC
geen probleem maat :wink: