"takes deep Breath"
OK, I have 2 planes in my map (targetnames : stuka1 & stuka2) I've then placed a script origin where I want them to fly to. Then done the usual CTRL K and connected them up.
Then placed a script_origin under each plane. Planes fly through map as they should.
Heres mymap.gsc
Quote:
main()
{
setCullFog (0, 3000, .32, .36, .40, 0 );
ambientPlay("ambient_mp_brecourt");
maps\mp\_load::main();
maps\mp\planes::main();
level thread maps\mp\_tankdrive_gmi::main();//for tanks
level thread maps\mp\_jeepdrive_gmi::main();//for jeeps
level thread maps\mp\_flak_gmi::main();//for flak88s
level thread maps\mp\Haugesund_Docks_fx::main();
flak = getent("flak1","targetname");// Without this it does not work!!
flak maps\mp\_flakvierling::init();// Without this it does not work!!
game["allies"] = "american";
game["axis"] = "german";
game["hud_allies_victory_image"] = "gfx/hud/hud@mp_victory_foy_us.dds";
game["hud_axis_victory_image"] = "gfx/hud/hud@mp_victory_foy_g.dds";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "airborne";
game["american_soldiervariation"] = "winter";
game["german_soldiertype"] = "wehrmacht";
game["german_soldiervariation"] = "winter";
game["ctf_layoutimage"] = "Haugesund_docks";
game["dom_layoutimage"] = "Haugesund_docks";
}
Heres my planes.gsc
Quote:
main()
{
level thread planes();
}
planes()
{
level.PlaneSpeed = 3.5;
stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
stuka3 = getent ("stuka3","targetname");
temp = getent (stuka1.target,"targetname");
stuka1.dest = temp.origin;
stuka1.start = stuka1.origin;
stuka1 hide();
temp = getent (stuka2.target,"targetname");
stuka2.dest = temp.origin;
stuka2.start = stuka2.origin;
stuka2 hide();
wait 15;
while (1)
{
stuka1 thread plane_flyby("stuka_flyby");
wait .60;
stuka2 thread plane_flyby("stuka_flyby");
wait .60;
wait 60;
}
}
plane_flyby(sound)
{
// If you specified a sound to play then play it
if (isdefined (sound))
self playsound (sound);
wait 5;
self show();
self moveto(self.dest, level.PlaneSpeed, 0.1, 0.1);
wait level.PlaneSpeed;
self hide();
self.origin = self.start;
}
Heres mymap soundaliases.csv
Quote:
"# If the text in the first column of a row starts with a # character, the row is ignored",,
,,"If the first column for a row is blank, then the row is ignored"
# The first non-comment line of a sound alias file specifies the key name for all values appearing in this column.,,
"# This means it is safe to swap entire columns around, though you should never swap partial columns.",,
"# You can invent new keys, but the game will ignore them if it doesn't know about them.",,
"# You can leave out keys, but the ""name"" and ""file"" keys must always be present.",,
,name,name of the alias that is used to play this sound (required)
,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)"
,file,the name of the file that contains the sound data (required)
,vol_min,"0 is silent, 1 is full volume (default = 1)"
,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)"
,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)"
,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)"
,dist_min,"within this distance in inches, the sound is always full volume (default = 120)"
,dist_max,"outside this distance in inches, the sound is not started. If left blank or set to 0, the sound will play from any distance. This does not affect sound volume falloff."
,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)",,,,,,,,,,,,,
,type,streamed / loaded (default = loaded),,,,,,,,,,,,,
,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1),,,,,,,,,,,,,
,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")",,,,,,,,,,,,,
,masterslave,"if ""master"", this is a master sound. If a number, then this sound won't exceed this volume whenever any master sound is playing. If blank, then neither master nor slave.",,,,,,,,,,,,,
,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"". If blank, the alias is used on all maps.",,,,,,,,,,,,,
name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle
null,1,null.wav,,,,,,,,,,,,,
flak_single,,weapons/flak/flak_single.wav,1,1,,,300,1020,auto,,,,,,
stuka_flyby,,vehicles/bf109_attack02c.wav,1.25,,,,100000,,,,,,,,
and finally heres mymap soundloadspecs.csv
Quote:
#DEFAULTS
dialog_mp.csv
gmi_dialog_mp.csv
generic_mp_sound.csv
gmi_mp_weap_all_allied.csv
gmi_mp_artillery.csv
haugesund_docks.csv
#VEHICLE
gmi_mp_vehicles_ru.csv
gmi_mp_vehicles_ge.csv
gmi_mp_vehicles_us.csv
Quite a lot to look at and your help is very, very apprecaited.
Paul