Author |
Topic: flying planes |
TheArmy |
General Member Since: Jun 24, 2006 Posts: 599 Last: Dec 25, 2009 [view latest posts] |
|
|
|
TheArmy |
General Member Since: Jun 24, 2006 Posts: 599 Last: Dec 25, 2009 [view latest posts] |
|
|
|
WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Thursday, Aug. 2, 2007 10:40 am |
|
The script looks ok to me, double check your keys and values in the models.
Also try this version of the script, I modified it slightly so it passes the origins to the flyby function directly.
Grassy
Code:
main()
{
level thread planes();
}
planes()
{
level.PlaneSpeed = 15;
stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
stuka3 = getent ("stuka3","targetname");
temp1 = getent (stuka1.target,"targetname");
//stuka1.dest = temp.origin;
org1 = temp1.origin;
//stuka1.start = stuka1.origin;
start1 = stuka1.origin;
stuka1 hide();
temp2 = getent (stuka2.target,"targetname");
//stuka2.dest = temp.origin;
org2 = temp2.origin;
//stuka2.start = stuka2.origin;
start2 = stuka2.origin;
stuka2 hide();
temp3 = getent (stuka3.target,"targetname");
//stuka3.dest = temp.origin;
org3 = temp3.origin;
//stuka3.start = stuka3.origin;
start3 = stuka3.origin;
stuka3 hide();
wait 2;
while (1)
{
stuka1 thread plane_flyby(org1,start1,"stuka_flyby");
wait .15;
stuka2 thread plane_flyby(org2,start2,"stuka_flyby");
wait .15;
stuka3 thread plane_flyby(org3,start3,"stuka_flyby");
wait 120;
}
}
plane_flyby(dest,start,sound)
{
// If you specified a sound to play then play it
if (isdefined (sound))
self playsound (sound);
wait 1;
self show();
self moveto(dest, level.PlaneSpeed, 0.1, 0.1);
wait level.PlaneSpeed;
self hide();
self.origin = start;
}
|
|
|
|
TheArmy |
General Member Since: Jun 24, 2006 Posts: 599 Last: Dec 25, 2009 [view latest posts] |
|
|
|
The_Caretaker |
General Member Since: Jun 8, 2004 Posts: 11625 Last: Jul 7, 2009 [view latest posts] |
|
|
|
TheArmy |
General Member Since: Jun 24, 2006 Posts: 599 Last: Dec 25, 2009 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Friday, Aug. 3, 2007 12:29 am |
|
So i put everything in one .csv file, but I get an error when I try and start cod2. Something about min_volume or whatever. This is what my script now looks like. Check it over please.
name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage
#Ambiance,,,,,,,,,,,,,,,,,,,,,,,
ambient_mp_skyscraper,,ambient/amb_Russia03_ext.mp3,0.4,,,,,,,local,streamed,,looping,,mp_skyscraper,,,,,,,,
name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle
null,,null.wav,,,,,,,,,,,,,
#Tank sounds,,,,,,,,,,,,,,,
stuka_flyby,,vehicles/stuka_by02.wav,1.25,,,,100000,,,,,,,,
|
|
|
|
WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
|
TheArmy |
General Member Since: Jun 24, 2006 Posts: 599 Last: Dec 25, 2009 [view latest posts] |
|
|
|
WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Friday, Aug. 3, 2007 11:49 am |
|
Ok here is a new soundalias file for your map.
Code: name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage
null,,null.wav,,,,,,,,,,,,,,,,,,,
#Ambiance,,,,,,,,,,,,,,,,,,,,,,,
ambient_mp_skyscraper,,ambient/amb_russia03_ext.mp3,0.7,,ambience,,,,,local,streamed,,looping,,mp_skyscraper,,,,,,ambience
#Level Specific,,,,,,,,,,,,,,,
,stuka_flyby,,vehicles/stuka_by02.wav,1.25,,,,100000,,,,,,,,
,this is a stock sound in Cod2 try this one
stuka_flyby,,vehicles/mrk_airplane_drone3b_loop.wav,0.68,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper
Code modified to play loopsounds:
Code:
main()
{
level thread planes();
}
planes()
{
level.PlaneSpeed = 15;
stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
stuka3 = getent ("stuka3","targetname");
temp1 = getent (stuka1.target,"targetname");
//stuka1.dest = temp.origin;
org1 = temp1.origin;
//stuka1.start = stuka1.origin;
start1 = stuka1.origin;
stuka1 hide();
temp2 = getent (stuka2.target,"targetname");
//stuka2.dest = temp.origin;
org2 = temp2.origin;
//stuka2.start = stuka2.origin;
start2 = stuka2.origin;
stuka2 hide();
temp3 = getent (stuka3.target,"targetname");
//stuka3.dest = temp.origin;
org3 = temp3.origin;
//stuka3.start = stuka3.origin;
start3 = stuka3.origin;
stuka3 hide();
wait 2;
while (1)
{
stuka1 thread plane_flyby(org1,start1,"stuka_flyby");
wait .15;
stuka2 thread plane_flyby(org2,start2,"stuka_flyby");
wait .15;
stuka3 thread plane_flyby(org3,start3,"stuka_flyby");
wait 120;
}
}
plane_flyby(dest,start,sound)
{
// If you specified a sound to play then play it
if (isdefined(sound))
self playloopsound(sound);
wait 1;
self show();
self moveto(dest, level.PlaneSpeed, 0.1, 0.1);
wait level.PlaneSpeed;
self stoploopsound(sound);
self hide();
self.origin = start;
}
Grassy |
|
|
|
TheArmy |
General Member Since: Jun 24, 2006 Posts: 599 Last: Dec 25, 2009 [view latest posts] |
|
|
|