script for school bel

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Bassie_w
Lance Corporal
Posts: 17
Joined: Sun May 07, 2006 3:45 pm
Location: The Netherlands

script for school bel

Post 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!
WHOOHOO!
Ophisâ„¢
Colonel
Posts: 461
Joined: Sun Mar 12, 2006 2:30 pm
Location: England, Manchester
Contact:

Re: script for school bel

Post 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.
Image[ Formerly Known As Snakeâ„¢ ]
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post 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.
Image
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post 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.
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post 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:
Image
Bassie_w
Lance Corporal
Posts: 17
Joined: Sun May 07, 2006 3:45 pm
Location: The Netherlands

Post 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 ;)
WHOOHOO!
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post by At0miC »

geen probleem maat :wink:
Post Reply