MODSonline Subscriptions
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
The next MODSonair show will air LIVE on:
03/21/2010 12:03 EDT

Time remaining:
We Dontated to PixelEquity
"Mods can significantly outshine and/or continue the success of the original game even when it is dated." 1
 
Site News   |   Aggregated News   |   Forums   |   Tutorials   |   Downloads   |   Projects   |   Weblinks
Latest Forum Threads 
CoD4 General.. Posts: (77) Views: (93) by DemonSeed
CoDWW Map + Mod .. Posts: (35) Views: (316) by dundy
CoD2 MP Mapping.. Posts: (4) Views: (51) by liltc64
CoD4 MP Mapping.. Posts: (10) Views: (144) by Infern4ll
CoD4 MP Mapping.. Posts: (28) Views: (474) by Darfyddi
CoD2 MP Mapping.. Posts: (9) Views: (75) by puncster1
CoD4 MP Mapping.. Posts: (17) Views: (88) by Infern4ll
CoD4 Scripting.. Posts: (4) Views: (38) by Samuel033
CoDUO Mapping.. Posts: (6) Views: (67) by Fawlty
CoD4 Map + Mod R.. Posts: (7) Views: (527) by tomv8
Back to Home Page
MODSCON 2010 L4D2 Contest
Art of War Central
Register/Login to Add a Tutorial
Tutorials
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Adding a flying Stuka to your maps
Versions: You must be logged in to view history.
Tutorial by rasta shows you how to add flying stukas to your map

Ok, i thought i woul 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

m8wplane1.jpg

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)
w4bplane2.jpg

Now thats it for the map, pretty simple so far!

3) 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();


4) 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

the original thread can be viewed here