Adding A Flying Stuka To Your Maps

Tutorial by rasta shows you how to add flying stukas to your map.


Ok, i thought i would make a little tutorial on adding stuka's to your map because a few people have asked how to do it!

  1. Create a script_model and give it these values:
model - xmodel/vehicle_plane_stuka
targetname - stuka1

I made three planes and gave them a targetname of stuka1, stuka2, stuka3

2. Next create a script origin (put this where you want the plane to fly to) deselect it, select the plane, select the origin and press ctrl - k to connect them (the order is important) Also put a script origin where the planes spawn, dont give it no values (just put it under the plane models) Now thats it for the map, pretty simple so far!

  1. Time for the script, create a new .gsc call it planes.gsc and put this in it:
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();
temp = getent (stuka3.target,"targetname");
stuka3.dest = temp.origin;
stuka3.start = stuka3.origin;
stuka3 hide();

wait 2;

while (1)
{
stuka1 thread plane_flyby("stuka_flyby");
wait .15;
stuka2 thread plane_flyby("stuka_flyby");
wait .15;
stuka3 thread plane_flyby("stuka_flyby");

wait 60;
}
}


plane_flyby(sound)
{
// If you specified a sound to play then play it
if (isdefined (sound))
self playsound (sound);

wait 15;

self show();

self moveto(self.dest, level.PlaneSpeed, 0.1, 0.1);

wait level.PlaneSpeed;

self hide();
self.origin = self.start;
} 

make sure you call on it in yourmap.gsc by putting this line in it maps\mp\planes::main();

  1. For the sounds you will need to create a new csv file and put this in it:
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,,,,,,,,

Make sure you put that in your soundaliases folder

That should be working fine now! remember to check out my new mp_omaha map when its finished and see the flying stuka's along with mortars and loads more

rasta

This page was last edited on 2024-06-07 18:05

Powered by vCoDMods

This page was last edited on 2024-06-07 18:05

Join our Discord
https://discord.gg/8hNC2M6MdS

Powered by vCoDMods