home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_02_randomambientext.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
2KB
|
83 lines
# Jedi Knight Cog Script
#
# 16a_RandomAmbient.cog
#
# Plays a random sound at random intervals with random volume and panning
#
# [JS]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
message startup
message timer
message user0
message user1
sound wav0
sound wav1
sound wav2
sound wav3
sound wav4
sound wav5
sound wav6
sound wav7
sound wav8
sound wav9
sound wav10
sound wav11
sound wav12
sound wav13
sound wav14
sound wav15
sound wav16
int numsounds
flex min_interval
flex range_interval
flex min_volume
flex range_volume
int temp local
int counter=0 local
int goahead=1 local
vector posOffset local
vector angOffset local
end
# ========================================================================================
code
user1:
startup:
print("starting ext ambs");
goahead=1;
SetTimer(min_interval+(rand()*range_interval));
return;
# .................................................................................
timer:
print("playing ext amb");
if (rand>0.5) pan=1;
else pan=0;
temp = rand()*numsounds;
PlaySoundLocal(wav0[temp], (min_volume+(rand()*range_volume)), pan, 0);
SetPOVShake('0.0 -.01 0.0', '1.0 0.0 0.0', .5, 80.0);
if (goahead==1) SetTimer(min_interval+(rand()*range_interval));
return;
# .................................................................................
user0:
print("stopping ext ambs");
goahead=0;
return;
end