PDA

View Full Version : [Tutorial] ADDING FLYING PLANES



MelVin
May 11th, 2009, 22:01
This Tutorial will try and explain how to add a plane to your multiplayer map.

*** NEVER ENTER QUOTATION MARKS ***

Mapping Part


First we need a model. I used "vehicle_jap_airplane_zero_fly"
Place the plane model were you want it to start ( *tip* make it start and end far off map but still inside the skybox, this will ehlp with the disapearing problem; )
Place a script orgin under the plane model and deselect it
Now select the plane model right click in the 2d window, go down to script and select "model" from the list ( the plane is now a script model )
hit escape to deselect everything.
Now put in a script origin were you want the plane to stop ( again the farther off map the better it will look, while still inside the skybox )



I repeated this 2 more times for a total of three planes, three untouched script origins below them and three script origins placed for their destinations



Select the first plane press n, at the bottom enter "targetname" in the "Key" box and "stuka1" in the "Value" box, hit enter

Just above were you typed you should see the value:
Key: targetname
Value: stuka1
Repeat this for your other planes naming them stuka2 and stuka3

Now to connect the planes to their destination "script origin" you placed on the other side of your map.



Select the plane ( DO NOT select the script origin u placed under the plane ) and the destination "script origin" in that order and then press W. You should see a red line connecting them with small arrows pointing to the destination "script origin"
Hit Esc key
Do the same to plane 2 and 3, one at a time

That should be all for Radiant, save and close

NOW for scripts


main()
{

level thread planes();
}

planes()
{
level.PlaneSpeed = 20;

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();
wait .01;
stuka2 thread plane_flyby();
wait .01;
stuka3 thread plane_flyby();

wait 90;
}
}


plane_flyby()
{
self playloopsound ("P47_By01");

wait 90;

self show();

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

wait level.PlaneSpeed;

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

... now in notepad under the File at the top select "SAVE AS" sal_planes.gsc ( remember when saving under "save as type" to select "All Files" to make the file a true gsc ) and save it in "D:\Program Files\Activision\Call of Duty - World at War\raw\maps\mp"

Your script is complete and should be finished at this point, the only thing you might want to play with is the plane speed and the wait 90 ( depending how often you want the planes to fly by and how fast you want them )

Now for the Sound

-Go to you Raw folder inside the main CODwaw directory ( by default C:\Program Files\Activision\Call of Duty - World at War\raw ) and open the soundaliases folder


name,sequence,file,platform,vol_min,vol_max,pitch_ min,pitch_max,dist_min,dist_max,dist_reverb_max,li mit_count,limit_type,entity_limit_count,entity_lim it_type,bus,priority,spatialized,type,probability, loop,masterslave,loadspec,reverb_falloff_curve,sub title,compression,randomize_type,secondaryaliasnam e,chainaliasname,volumefalloffcurve,startdelay,spe akermap,reverb_send,lfe percentage,center percentage,envelop_min,envelop_max,envelop percentage,occlusion_level,occlusion_wet_dry,real_ delay,distance_lpf,move_type,move_time,min_priorit y,max_priority,min_priority_threshold,max_priority _threshold


# sal_planes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,
P47_By01,,SFX/Vehicles/Planes/P47/ARPL_P47_By01.wav,!wii,0.9,0.9,0.92,1,4000,7900,15 00,,,,,ambience,,3d,,,looping,,all_mp,curve3,,,,,, curve3,,,0.7,,,,,,,,,no,left_player,60,0.25,1


Note: 4000, 7900, 1500 are the values that control how far away you hear the planes and if you hear the full noise or the distant noise only, to avaiod problems make sure the planes start at least that many units off ANY playable part of the map or the sounds will constantly hum, in my expereince.


... and save it in your soundaliases folder like you did with the sal_planes.gsc except this time it will be a .csv file named after your map ie mp_yourmap.csv.

-Go back to "C:\Program Files\Activision\Call of Duty - World at War\raw\maps\mp" in your main map .gsc file
add the following line

maps\mp\sal_planes::main();

here is my example from Kwalajein:


main()
{


maps\mp\_interactive_objects::init();
maps\mp\_load::main();
maps\mp\sal_planes::main();
maps\mp\mp_kwalajein_fx::main();
maps\mp\createart\mp_kwalajein_art::main();


// If the team nationalites change in this file,
// you must update the team nationality in the level's csc file as well!
game["allies"] = "marines";
game["axis"] = "japanese";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["allies_soldiertype"] = "pacific";
game["axis_soldiertype"] = "pacific";

maps\mp\_compass::setupMiniMap("compass_map_mp_kwalajein");
setdvar("compassmaxrange","2500");
setdvar( "r_specularcolorscale", "1" );


// enable new spawning system
maps\mp\gametypes\_spawning::level_use_unified_spa wning(true); // And this
}

Yours should look similar.

- now go to your Zone Source folder by default its "D:\Program Files\Activision\Call of Duty - World at War\zone_source"
add this...

rawfile,maps/mp/sal_planes.gsc
sound,mp_yourmap,mp_yourmap,all_mp

...to your mp_yourmap.csv file

this should cover the planes and sounds

now compile and test...

you should have planes flying across the map

Thanks goes out to the original scripter, rasta and Zeroy

miregrobar
May 30th, 2009, 12:20
Nice script,work fine on my map

http://youtu.be/7OduWbHN2YU

But how do i make that server admins have option to turn off this if they dont like planes flying on my map?
Thanks

Robinson
June 2nd, 2009, 08:27
I posted this on another site before - Changing the main function to this would give admins the ability to disable the flyovers if they wished.


main()
{
if(getdvar("sv_flyovers") == "") setdvar("sv_flyovers","1");

if(getdvar("sv_flyovers") == "1")
level thread planes();
}

dundy
June 2nd, 2009, 17:33
had it in my map but i seems to give Fps drops and with some player

connection interruption..... just my 2 centshttp://www.codutility.com/images/icones/cool.gif

MelVin
June 3rd, 2009, 02:34
Dundy it might drop FPS a tiny bit, but it should have nothing to do with the connection interruptions.

miregrobar
June 4th, 2009, 01:17
I posted this on another site before - Changing the main function to this would give admins the ability to disable the flyovers if they wished.


main()
{
if(getdvar("sv_flyovers") == "") setdvar("sv_flyovers","1");

if(getdvar("sv_flyovers") == "1")
level thread planes();
}

Where to add this part of code?

MelVin
June 4th, 2009, 05:37
think it should go in your main gsc file, located in
C:\Program Files\Activision\Call of Duty - World at War\raw\maps\mp

miregrobar
June 4th, 2009, 06:22
MelVin has wrote :

think it should go in your main gsc file, located in
C:\Program Files\Activision\Call of Duty - World at War\raw\maps\mp
well i try to add there but i get errors http://www.codutility.com/images/icones/confused.gif

MelVin
June 4th, 2009, 19:26
sorry about that, looking at the sal_planes.gsc it looks like it would fit right at the top,




main()
{

level thread planes();
}







will now be




main()
{
if(getdvar("sv_flyovers") == "") setdvar("sv_flyovers","1");

if(getdvar("sv_flyovers") == "1")
level thread planes();
}






... try this and see if it works, it's best guess but I'm fairly sure it should be right. Good Luck nad plz let me know if it works for you.

miregrobar
June 5th, 2009, 13:18
Its working fine now.Thanks man http://www.codutility.com/images/icones/wink.gif

MelVin
June 5th, 2009, 23:12
Good to hear, glad to help.

miregrobar
June 6th, 2009, 04:03
MelVin has wrote :

Good to hear, glad to help.
Thanks again man http://www.codutility.com/images/icones/wink.gif

AngryGod
June 23rd, 2009, 21:06
Hi Melvin,
I tried out your planes tut and all seemed well until I went to test it, upon compile and launch I get the following -server script compile error undefined is not a field object -
and when I check the console the only error(other than texture needs to be aligned on some terrain) is
ERROR: Invalid column name 'max_priority_threshold ' in mp_dockyard.csv at column 47
ERROR: Invalid column name 'max_priority_threshold ' in mp_dockyard.csv at column 47

it repeats as you see here twice. Any advice or help/ideas as to the cause of this? I am going to A: go through and check(3rd time) to be sure all is as it should be(maybe missed target name, connection whatever) and B: comment out the line and see if that helps if A doesn't work.

I am trying to run my map under the ACE5.4 mod(don't know if it helps but knowing is always better than not)

Also I have one other question concerning sound, when you define your parameters at the top, must you include all column names or can you just use those columns which you are going to call on(assign a value to),min/max dist min/max vol ect.

thankx in advance for your time

A.G.

CaptCom
June 23rd, 2009, 21:34
You replace each columns not in use by a comma ","

MelVin
June 24th, 2009, 02:46
could you post your scripts, that would help. Never seen this error before. the tutorial should work but if your soundalias file is different than mine it might need to be adjusted.

if the top of your soundalias file is different form the one I used you must make sure the values are in the right spot for yours to work. Hope this helps.

AngryGod
June 24th, 2009, 16:32
Well basically I just copy/pasted your code from the tut.


name,sequence,file,platform,vol_min,vol_max,pitch_ min,pitch_max,dist_min,dist_max,dist_reverb_max,li mit_count,limit_type,entity_limit_count,entity_lim it_type,bus,priority,spatialized,type,probability, loop,masterslave,loadspec,reverb_falloff_curve,sub title,compression,randomize_type,secondaryaliasnam e,chainaliasname,volumefalloffcurve,startdelay,spe akermap,reverb_send,lfe percentage,center percentage,envelop_min,envelop_max,envelop percentage,occlusion_level,occlusion_wet_dry,real_ delay,distance_lpf,move_type,move_time,min_priorit y,max_priority,min_priority_threshold,max_priority _threshold


# sal_planes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,
P47_By01,,SFX/Vehicles/Planes/P47/ARPL_P47_By01.wav,!wii,0.9,0.9,0.92,1,4000,7900,15 00,,,,,ambience,,3d,,,looping,,all_mp,curve3,,,,,, curve3,,,0.7,,,,,,,,,no,left_player,60,0.25,1

# sal_planes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,
P47_By01,,SFX/Vehicles/Planes/P47/ARPL_P47_By01.wav,!wii,0.9,0.9,0.92,1,4000,7900,15 00,,,,,ambience,,3d,,,looping,,all_mp,curve3,,,,,, curve3,,,0.7,,,,,,,,,no,left_player,60,0.25,1

I still have not had a chance to work through it again(got a 2 year old and full time job :( ) will do after I have a nap,or about 2 hours from now, and let you know what happens( make sure I did the radiant portion correctly ect.), compile, test,comment out the lines see if that helps or if it something else but this is the only change since last test the day before, so I am hoping I just did something wrong in Rad.

The only change to your setup I did was to switch out the center model with a different one in rad, but still gave it the same targetname key/value pair(eg :model/stuka1). so it is set to have the two zeros on the outside and a plane with pontoons for the center(since the map is based near water kinda fits). thankx again for your help.

also Capt.com, I realize the comma replacement but what I am asking is if I only use the basics(name sequence file platform vol min/max ect for an ambient track(this is a different map sound has been a sore point for me) can I just call them out at the top(not list off all parameters therefore reducing the commas to only whats is being used : ie if I am not using an envelope or priority must I include it at the top or can I leave it out therefore negating the need for that comma below)

I hope this clarifies my question as I am some what scriptarded, I am not sure if the columns must all be there or not.

Thankx again to you both, great site btw Capt.

AngryGod
June 24th, 2009, 22:44
k, so I got the max priority threshold fixed ( I had a space after it, my bad ) but am still receiving the script compiled error undefined is not a field object. I checked all the radiant components ( actually redid each one in sequence ) and used copy/paste for all associated files ( sal planes ect. ) and rechecked to be sure they are save in the right place/file extension. Am curious as to the function of the undefined script origins we place beneath the planes?

Thankx again

MelVin
June 24th, 2009, 23:16
I packed all the radiant stuff into it's one .map file. you can open it up like a normal map. this is exactly how I have done it.

DOWNLOAD PLANES ALREADY SETUP HERE (http://www.mediafire.com/download.php?etjjnyj1jme)

At the same time check your main gsc file and make sure it's in the same order as mine just to be safe.

It took me a few days to get it to work, persistence will pay off http://www.codutility.com/images/icones/wink.gif
just keep at it. The tutorial has worked several times so it's probably something small you are missing.
1 letter in the wrong place and everything will break.
So check your scripts carefully. You can post all scripts involved
(soundalias,main gsc and zone files)
and I can see if I can spot something.


ADMIN EDIT: Link is not good, please replace

AngryGod
June 25th, 2009, 17:15
Okay, well it must have been something I was doing in the selection order whilst in radiant. When I looked at your file it contains some green connection lines that my map did not, I had the red ones from the planes to destination s cript origin but not the green ones that seem to anchor at 0 0 0, then change to red and continue to the destination script origin. So anyway I deleted my failed setup, opened your file selected all and copied to my map, replaced the center model ( with the Rufe_fly ) compiled and is right with the world again. Thank you so much for your help.

http://www.codutility.com/images/icones/bowdown.gifhttp://www.codutility.com/images/icones/bowdown.gifhttp://www.codutility.com/images/icones/bowdown.gifhttp://www.codutility.com/images/icones/champion-1er.gif

MelVin
June 25th, 2009, 23:24
that's what we're here for http://www.codutility.com/images/icones/wink.gif Just glad to see your stuff working, and the headache over for you. If you have any other problems, just post. http://www.codutility.com/images/icones/smile.gif

MelVin

AngryGod
June 27th, 2009, 23:00
Here is another question for you Melvin, theoretically I could use the same idea to have ships 'patrol' the waters as well, ie create the objects as in rad same as the planes but use a script kinda like so:



main()
{

ships()
{
level.shipSpeed = 20;

pbr1 = getent ("pbr1","targetname");

temp = getent (pbr1.target,"targetname");
pbr1.dest = temp.origin;
pbr1.start = pbr1.origin;
pbr1 hide();

wait 2;

while (1)
{
pbr1 thread ship_patrol();
wait .01;

}
}
ship_patrol()
{
self playloopsound ("sound_name");

wait 90;

self show();

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

wait level.shipSpeed;

self hide();
self.origin = self.start;
}
}Any input would be appreciated . Thankx again

MelVin
June 29th, 2009, 03:15
don't see why it wouldn't work. you shouldn't even have to go as far as you did. Just changing the models to boats would work(like you already have with the plane modelshttp://www.codutility.com/images/icones/wink.gif. If you want to use it in the playable part of the map, that might kind of create a problem. make sure there is a collmap ( so that you can't walk through it ) for the model you plan to use. and that the boats path is clear.

Really the script can be used for any object be it a bird, plane, suit case etc. Nice idea, great thinking outside the box http://www.codutility.com/images/icones/wink.gif

AngryGod
June 29th, 2009, 05:55
one small change, well omission , I forgot the line -level thread ships();- after main, but when added all seems to work okay, got to tweak the timing/speed but, tested this morning and it works http://www.codutility.com/images/icones/smile.gif

AngryGod
June 29th, 2009, 05:59
one other question, is it possible to string script origins together to have the ship/plane fly a sorta route? ie goto point a then point b, etc? example say ship comes in close to shore then alters course to run along the coast line?

MelVin
June 30th, 2009, 01:33
it should be possible. I'm not sure off the top of my head but I'm guessing you would have to set it up like the choppers in cod4. it's been awhile so it's something I'll have to look into.

AngryGod
July 3rd, 2009, 12:14
Have a similar question concerning the hide function

I am using the jap merchant ship model in my map, it sits in port for 5 minutes then departs, this is all good, but at the end of its route due to its size(huge) it remains in view at the edge of my skybox, I have tried adding the self hide(); command in a few places to my script but it has been causing the ship to dissappear before it moves.



main()
{
level thread mership();
}

mership()
{
level.shipSpeed = 80;

mership = getent ("mership","targetname");

temp = getent (mership.target,"targetname");
mership.dest = temp.origin;
mership.start = mership.origin;
mership show();

wait 300;

while (1)
{
mership thread embark();
wait 20;

}
}

embark()
{
self playloopsound ("p47_By01");

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

wait 360;

self.origin = self.start;



}I have tried to put the hide before the final wait, and after it but still the ship will just disappear, not travel to its destination.I also change the first hide ( from the planes tut ) to a show so the boat is visible at level start (our timer is set to 10 minutes, the ship waits 5min, then departs, gets to the end of its trip and waits 6 min-so as not to reappear while game is still in progress) any help in hiding this at the trips end would be welcome.

thankx for your time

Ray
July 3rd, 2009, 15:40
A simple solution would be to have it sail into a fairly thick fog bank at the end of its departure run. If the fog is thick enough it should hide the ship.

AngryGod
July 3rd, 2009, 19:27
I am using a vol fog right now on a multi-tierd map, but may try adding a low flying cloud in just that spot, thanks for the idea http://www.codutility.com/images/icones/smile.gif

MelVin
July 3rd, 2009, 23:21
not sure if it would work, but what about just hiding the ship before the 5 min wait. This script is just a guess might not work, but worth a try.



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

wait 20;

mership hide();

wait 300;

self.origin = self.start;



}

If you do try it let me know if it works or not.

MelVin

AngryGod
July 4th, 2009, 06:23
Will try it but after this weekend, we got a play test set up so I cant alter it yet http://www.codutility.com/images/icones/wink.gif

AngryGod
July 6th, 2009, 18:43
After I altered the code as you show above, I got server script compile error - uninitialized object mership see console for details, so I think I am going to just try some low cloud cover(to simulate denser fog) to hide the ship at scripts end, and skip the headaches invoked by trying to figure this out for now http://www.codutility.com/images/icones/smile.gif

MelVin
July 6th, 2009, 21:39
an easy way would be to use smoke and some sort of fire. this would allow you to control the effect and have a purpose for it at the same time. sorry the scirpt didn't work, will look at it and see if I can get it to work.

AngryGod
July 8th, 2009, 19:00
no worries MelVin, can live with a smoke or cloud for this one and will look into getting the other straight later is all, you know the drill, if it pisses you off do something else for a bit, have a go at it later http://www.codutility.com/images/icones/wink.gif

MelVin
July 9th, 2009, 06:21
great attitude http://www.codutility.com/images/icones/wink.gif

james30263
September 2nd, 2009, 13:11
I used your tut to add planes and it worked great. Thanks...I do have one question. I cant seem to make the sound match when the planes fly over. I hear the fly by sound alot more than the planes fly over. How do I edit the sal_planes file so I can make the sound wait the same amount of time as the planes so you will hear the plane sound when they actually fly over?

MelVin
September 2nd, 2009, 13:44
Glad to hear, your welcomehttp://www.codutility.com/images/icones/wink.gif

I did find if the planes start to close to your playable part of the map the sounds will constantly repeat.

Here is a something to check, from the tutorial






P47/ARPL_P47_By01.wav,!wii,0.9,0.9,0.92,1,4000,7900,15 00,,,,,ambience,,3d,,,looping,,all_mp,curve3,,,,,, curve3,,,0.7,,,,,,,,,no,left_player,60,0.25,1




**** note 4000, 7900, 1500 are the values that control how far away you hear the planes and if you hear the full noise or the distant noise only, to avoid problems make sure the planes start at least that many units off ANY playable part of the map or the sounds will constantly hum, in my experience.

have you made sure the the planes start at least 7900 units (or what ever the dist_max is set to in your soundalias .csv) away from the playable parts of your map. When I first used the planes that was a problem for me. check this and let us know how you make out. Good luck.

james30263
September 2nd, 2009, 14:01
I looked at that setting and the planes are closer than 7900. they are more like 2600 units away. What would be better? Make the skybox larger or change the units to 2600. If I need to change it to 2600 should it look like this? "4000,2600,1500"...I tried to change the sound distance yesterday but the sound just went away. Thanks for your help http://www.codutility.com/images/icones/wink.gif

MelVin
September 2nd, 2009, 14:45
no prob james http://www.codutility.com/images/icones/wink.gif

I like making the skybox real big, it does 2 things that benefit me. first it makes it a lot easier to hide the planes when they go off map. And secondly it fixes your current problem. also make sure the path is far as possible off map, the smaller the planes are when they disappear the better...


to change it to 2600 should it look like this? "4000,2600,1500"

If you decide you would rather shorten the sound distance the 4000 should be lowered less than 2600. 2600 will be the distance the sound STOPS playing and 4000 is the distance when it starts playing at max volume(0.9 or 90% if U used the tuts soundalias code). So you have the sound stopping before it starts when you changed it. Try something like 650,2550,900 this might need tweaking depending on the exact distances and plane speed you use, but you'll know that best.

Hope this helps you, if you have any problems/questions post back. Good luck.

james30263
September 3rd, 2009, 08:02
I made my skybox larger and put the planes 7900 units away and they worked great. I would like to change the plane speed to 10 to make them go faster across the map. How would I adjust the sound distance? (4000,7900,1500) Would I shorten that distance up some? I put the plane speed to 10 and they fly at the speed I want but the sound is a little bit off. Thanks for your help and sorry about all the questions...I'm just trying to understand these settings better. http://www.codutility.com/images/icones/biggrin.gif

MelVin
September 3rd, 2009, 09:36
how is the sound off? does it end to soon or to late?

either way you'll probably have to play with it a bit. the one thing that helps is U should only have to build Fast files again to test. all other boxes can be unchecked.
Try lowering the 4000 to something like 2500. that should let the sound start sooner. Post back and let us know how you make out.

Never be sorry for posting questions here m8, that's what we're here for if we can help we willhttp://www.codutility.com/images/icones/wink.gif best of luck.

MelVin

james30263
September 3rd, 2009, 09:47
Thanks for the input bud. I will keep you updated on the progress...http://www.codutility.com/images/icones/biggrin.gif

james30263
September 3rd, 2009, 17:51
I was able to get the sound working correctly with the speed set to 15. I changed the sound to 3000,7900,1500. These setttings made the sound work at this speed for me. I want the speed at 10 since my planes fly so low so I will keep working on it and keep you updated. http://www.codutility.com/images/icones/biggrin.gif

MelVin
September 21st, 2009, 04:06
thanks james. Someone will benefit from your work, great stuff.

james30263
September 26th, 2009, 09:03
No Problem Melvin. http://www.codutility.com/images/icones/biggrin.gif I noticed that changing the speed from 15 to 10 really has no difference so I'm just going to keep it on 15. http://www.codutility.com/images/icones/number-one-45.gif

beeboy78
January 18th, 2010, 07:31
i try download tuto but files no found on mediafire http://www.codutility.com/images/icones/frown.gif

i try your tuto but my plane come and leave but he don' move and don't sound!

probably cause by my bad "script_origin" or "value" of my plane i don't no!

i'm french and i don't understant all tuto with my bad english! XD

thx for all!

CaptCom
January 18th, 2010, 07:34
Dis-moi quelle partie tu ne comprends pas. Je vais faire la traduction http://www.codutility.com/images/icones/wink.gif

beeboy78
January 18th, 2010, 07:37
merci ? toi! http://www.codutility.com/images/icones/champion-1er.gif

j'ai cr?er mon avion ensuite en dessou j'ai mi mon script_origin et un autre a l endroit ou je veu que l avion se stop apres je plante complet je comprend pas la moitier des mots (je suis un low en anglais ^^)

il doit y avoir des valeur a mettre sur le model et les script origin que je ne comprend pas!

mon avion apparait et disparait 10/15 second plus tard sans bouger ni faire de son

en faite voil? ou je me perd les p?dales !


-Now put in a script origin were you want the plane to stop ( again the farther off map the better it will look, while still inside the skybox )

*I repeated this 2 more times for a total of three planes, three untouched script origins below them and three script origins placed for their destinations

-Select the first plane press n, at the bottom enter "targetname" in the "Key" box and "stuka1" in the "Value" box, hit enter
-Just above were you typed you should see the value targetname | stuka1
-Repeat this for your other planes naming them stuka2 and stuka3

Now to connect the planes to their destination "script origin" you placed on the other side of your map.

-Select the plane ( DO NOT select the script origin u placed under the plane ) and the destination "script origin" in that order and then press W.
You should see a red line connecting them with small arrows pointing to the destination "script origin"

et voici les erreur de radiant


ERROR: Sound alias file mp_playa.csv: limit_count '4000' is not within the range of '1'-'256'.
ERROR: Sound alias P47_By01 file mp_playa.csv: Unknown limit_type '7900'; should be none,oldest,reject,priority
Invalid token 'left_player' in column 'distance_lpf' for alias 'P47_By01'
ERROR: Sound alias P47_By01 file mp_playa.csv: Unknown move_type '60'; should be none,left_player,right_player,left_shot,right_shot

beeboy78
January 18th, 2010, 08:52
ok je suis nul!

bref j'ai reussi en suivant le tuto pour faire bouger l'avion!http://www.codutility.com/images/icones/number-one-45.gif

mais je n'es toujours pas de son !

CaptCom
January 18th, 2010, 09:11
Voil? la traduction est termin?e. Si jamais tu as d'autres probl?me n'h?site pas ? poster. http://www.codutility.com/images/icones/wink.gif

beeboy78
January 18th, 2010, 09:20
ecoute pour le son je comprend pas les 3 valeur a modif (4000,7900,1500) mais je modifie par raport a koi? les valeur x,y,z de l avion?

CaptCom
January 18th, 2010, 10:19
4000: volume du son au d?part
7900: volume du son quand l'avion est juste au-dessus de toi
et 1500: volume du son au loin

Ces sons sont modifiables directement ? partir du fichier .csv.

Tu les modifie selon la m?thode essai/erreur http://www.codutility.com/images/icones/wink.gif

N'oublis pas de faire un update du fichier zone_source et de reconstruire le fast file avant d'essayer. Pas besoin de recompiler car tu ne touches pas ? la map en tant que tel.

beeboy78
January 18th, 2010, 10:28
j'ai mi sa dans mon "raw/soundallias" mp_mamap.csv


P47_By01,,SFX/Vehicles/Planes/P47/ARPL_P47_By01.wav,!wii,0.9,0.9,0.92,1,4000,7900,15 00,,,,,ambience,,3d,,,looping,,all_mp,curve3,,,,,, curve3,,,0.7,,,,,,,,,no,left_player,60,0.25,1

et voici les erreur du radiant!


ERROR: Sound alias file mp_playa.csv: limit_count '4000' is not within the range of '1'-'256'.
ERROR: Sound alias P47_By01 file mp_playa.csv: Unknown limit_type '7900'; should be none,oldest,reject,priority
ERROR: Sound alias file mp_playa.csv: entity_limit_count '1500' is not within the range of '1'-'256'.
ERROR: Sound alias file mp_playa.csv: Unknown curve '3d'
ERROR: Sound alias file mp_playa.csv: Unknown sound spatialized type 'all_mp'; valid values are either blank, '3d', or 'spatialized' for true, or either '2d' or 'nonspatialized' for false.
ERROR: Sound alias file mp_playa.csv: Unknown sound type 'curve3'; should be primed, streamed or loaded
Invalid token 'left_player' in column 'distance_lpf' for alias 'P47_By01'
ERROR: Sound alias P47_By01 file mp_playa.csv: Unknown move_type '60'; should be none,left_player,right_player,left_shot,right_shot

as tu une solution?

CaptCom
January 18th, 2010, 10:45
hum... je regarde ca et je te reviens.

beeboy78
January 18th, 2010, 12:32
merci ? toi c'est simpa !

aaaaaa j'ai trouver!!!!!!

j'avais creer mon soundallias sur la base de mp_drum

et je n'avai pas fait attention au ambient sfx donc j'ai refait tous le sound allias et sa a fonctionner nikel!

un grand merci a vous pour vos tuto

a oui aussi j'ai le sons qui tourne en boucle meme quand l avion n'es pas la

MelVin
January 18th, 2010, 23:17
il suffit de d?placer les avions de retour plus loin. Si elles sont "7900" unit?s de la carte ils ne feront pas de bruit jusqu'? ce qu'ils viennent dans la carte, devrait fonctionner. Heureux de voir que ?a fonctionnehttp://www.codutility.com/images/icones/smile.gif

beeboy78
January 19th, 2010, 04:16
nikel melvin vue que ma map est toute petite c'est pour sa que je l entendai tous le temp un grand bravo a vous tous

CaptCom
January 19th, 2010, 04:25
Super si ?a fonctionne. N'oublie pas une chose, le skybox peut ?tre tr?s grand. Pas n?cessairement juste entourer la map elle-m?me.

MelVin has wrote :

il suffit de d?placer les avions de retour plus loin. Si elles sont "7900" unit?s de la carte ils ne feront pas de bruit jusqu'? ce qu'ils viennent dans la carte, devrait fonctionner. Heureux de voir que ?a fonctionnehttp://www.codutility.com/images/icones/smile.gif

http://www.codutility.com/images/icones/mdr2.gif http://www.codutility.com/images/icones/mdr2.gif http://www.codutility.com/images/icones/mdr2.gif MelVin in french http://www.codutility.com/images/icones/bravo.gif

beeboy78
January 19th, 2010, 16:51
je retiens toujours les bon conseille !!!

mais la j'ai compiler la map et je l'ai mise sur mon serveur (linux)

et la map me met un erreur!


******* script runtime error *******
undefined is not a field object: (file 'maps/mp/_sal_planes.gsc', line 19)
temp = getent (stuka2.target,"targetname");
*
Error: called from:
(file 'maps/mp/_sal_planes.gsc', line 3)
level thread planes();
*
Error: called from:
(file 'maps/mp/mp_playa.gsc', line 13)
maps\mp\_sal_planes::main();
*
Error: started from:
(file 'maps/mp/mp_playa.gsc', line 1)
main()
*
Error: ************************************
Database: Assets Sync Started
Database: Assets Sync Finished
********************
ERROR: script runtime error
(see console for details)
undefined is not a field object
********************
----- Server Shutdown -----
==== ShutdownGame (1) ====
---------------------------

MelVin
January 19th, 2010, 22:32
s'il vous pla?t envoyer votre script. Je vais regarder. merci

@capt blame google m8 http://www.codutility.com/images/icones/wink.gif lol

beeboy78
January 20th, 2010, 10:23
ok my "sal_planes" in to "raw->maps->mp"



main()
{
if(getdvar("sv_flyovers") == "") setdvar("sv_flyovers","1");

if(getdvar("sv_flyovers") == "1")
level thread planes();
}

planes()
{
level.PlaneSpeed = 20;

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();
wait .01;
stuka2 thread plane_flyby();
wait .01;
stuka3 thread plane_flyby();

wait 90;
}
}


plane_flyby()
{
self playloopsound ("P47_By01");

wait 90;

self show();

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

wait level.PlaneSpeed;

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

beeboy78
January 20th, 2010, 10:24
and my modif line in to my mp_map.gsc in"raw->maps->mp"



main()
{
//maps\createart\mp_cargoship_art::main();
//needs to be first for create fx
maps\mp\mp_playa_fx::main();

maps\mp\_interactive_objects::init();
maps\mp\_destruc::init();
maps\mp\_load::main();

maps\mp\_breakable_windows::main();
maps\mp\sal_planes::main();
maps\mp\mp_playa_amb::main();

maps\mp\_compass::setupMiniMap("compass_map_mp_playa");

setExpFog(600, 1600, 0.5, 0.5, 0.5, 0);
VisionSetNaked( "mp_cargoship" );
ambientPlay("ambient_cargoshipmp_ext");

// If the team nationalites change in this file,
// you must update the team nationality in the level's csc file as well!
game["allies"] = "marines";
game["axis"] = "german";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "pacific";
game["axis_soldiertype"] = "german";

setdvar( "r_specularcolorscale", "1" );

setdvar("compassmaxrange","2500");

thread trigger_killer( (2166,-604, -556), 125, 10 );


// enable new spawning system
maps\mp\gametypes\_spawning::level_use_unified_spa wning(true);


}

trigger_killer( position, width, height )
{
kill_trig = spawn("trigger_radius", position, 0, width, height);

while(1)
{
kill_trig waittill("trigger",player);
if ( isplayer( player ) )
{
player suicide();
}
}
}

MelVin
January 20th, 2010, 23:50
Voici l'avions d?j? fait.
regarder cela et comparer avec ce que vous avez. Hope this helpshttp://www.codutility.com/images/icones/smile.gif. probl?me devrait ?tre manquant d'entr?e de l'int?rieur de la carte.

CLICK HERE FOR PLANES SETUP PREFAB (http://www.mediafire.com/?mfmzjzmz2yn)



ADMIN EDIT: Link is not good, please replace

beeboy78
January 21st, 2010, 05:00
merci ? toi je test sa tous de suite!

thx i test this now !

beeboy78
January 22nd, 2010, 05:09
mon probl?me viens de la liaison sur radiant avec la touche "W"

j'avais raccorder le 1er "script_origin" a l'avion et l'avion au dernier "script_origin" alors que toi tu as juste raccorder l'avion au dernier "script_origin" .

c'est la seul diff?rence ^^

un grand merci a Mr Melvin et Mr Capt.Com http://www.codutility.com/images/icones/number-one-45.gif

CaptCom
January 22nd, 2010, 07:24
Juste une petite clarification http://www.codutility.com/images/icones/wink.gif

...Pour faire cela, s?lectionner un avion ( mais pas le script_origin plac? sous l'avion ) et le script_origin de la destination finale ensuite presser "W".

http://www.codutility.com/images/icones/number-one-45.gif

miregrobar
December 28th, 2010, 04:59
How to add efect to this script? i want to make smoke trail on planes.

Tally
December 29th, 2010, 09:22
miregrobar has wrote :

How to add efect to this script? i want to make smoke trail on planes.

If you know all the tags for the stuka model you're using, then do it like they did with the afterburner effect on the Migs in COD4 - use playfxontag() (see maps\mp\gametypes\_hardpoints::playPlaneFx()).

If you don't know the name of the model tags, you can spawn a script_model on the stuka model, and then set the model as tag_origin. Use Linkto() or attach() to stick the tag_origin model to the stuka model, then run your FX by using playfxontag(). Example:



{
effectModel = spawn( "script_model", stuka.origin );
effectModel setModel( "tag_origin" );
effectModel.origin = stuka.origin;
effectModel.angles = stuka.angles;
effectModel Linkto( stuka );
playfxontag( level.yourFX, effectModel, "tag_origin" );

}

miregrobar
December 29th, 2010, 11:00
Thanks m8, i will try this. I need this for cod4.

HolyMoly
December 30th, 2010, 11:22
http://www.codutility.com/images/icones/wink.gifIf you want to add colored contrails, I have blue, green, red and white! Just P.M. me.


Fred

Blade_MacTavish
October 7th, 2011, 01:09
Sorry to bump, but could you readd those prefab and script files MelVin? They keep getting deleted from the site. :/

Blade_MacTavish
October 7th, 2011, 02:31
Nevermind, I managed to get everything working on my first try. It feels like MW3 when I look up in my city map to see these jets flying above the ruined skyscrapers. http://www.codutility.com/images/icones/biggrin.gif

MelVin
October 7th, 2011, 20:36
great newshttp://www.codutility.com/images/icones/bravo.gif

grissim
May 8th, 2013, 10:24
I followed you tut.I must of done something wrong.
Lets start at the plane I used(p51 mustang)does that matter?
Second after they were made a script model I had trouble selecting them.I made a chalk box around one then chose select/select thouching,is that the way?

Scripting part; one thing I noticed was I had already had mp_mapename.csv in my soundaliases so I just added the sound script in there.I have the sound problem but I can fix.

The problem is in game what im seeing is 3 planes at the starting pos and nothing flying lol there pretty but.....

Im also thinking ahead im sure this will be fixed.Im wondering two things.1 Can I make these planes change height during there flight,you know drop down and then gain height as they leave the map.
2; will a plane fly through a trigger and cause a exploction on the ground as if it was droping a bomb.If so wouldn't that be cool.

Thanks for you help in advance



Griss

privateparts
May 21st, 2014, 04:00
does the plane script work for cod 4 as well

MelVin
May 21st, 2014, 05:24
yes it will work for cod4 as well but you will have to change the models unless you port them to cod4). Besides that it should all work the same.

privateparts
June 25th, 2014, 06:22
can this be used for cod 4 if so how please?

dundy
June 25th, 2014, 09:57
can this be used for cod 4 if so how please?


yes it will work for cod4 as well but you will have to change the models unless you port them to cod4). Besides that it should all work the same.

Same as it is explained in tut...

privateparts
June 27th, 2014, 07:01
what i did placed a script model in without a script origin underneath then i placed a script origin to the destination and connected them esc and compiled here is my script for the truck.gsc

main()
{

level thread truck();
}

truck()
{
level.truckSpeed = 20;
truck = getent ("truck","targetname");


temp = getent (truck.target,"targetname");
truck.dest = temp.origin;
truck.start = truck.origin;
truck hide();




wait 2;

while (1)
{
truck thread truck_driveby();
wait .01;


wait 90;
}
}


truck_driveby()
{


wait 90;

self show();

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

wait level.truckSpeed;

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

then i put the line in the main gsc calling the truck gsc and then updated zonefile it came up with an error ?????? not sure why i took out the sound so I can just get the thing to move its something sound can come later.

{OSG}Brodie
June 27th, 2014, 08:22
why did you not use the script i gave you it works perfectly well Grant

CaptCom
June 27th, 2014, 08:34
I have a test map I made years ago with moving tanks. Everything is working #1 ( except the sound ) but if you are interested at looking how I did it, I'll send you all the files.

CaptCom
June 27th, 2014, 10:01
The idea is to keep the scripts the simplest as possible.
The one posted above by Grant is too complicated for nothing.

I use mine in the main gsc and it looks like this:

main()
{


maps\mp\_load::main();
maps\mp\mp_veh_mov_fx::main();
ambientPlay("ambient_citystreets_day");


game["allies"] = "marines";
game["axis"] = "opfor";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["allies_soldiertype"] = "desert";
game["axis_soldiertype"] = "desert";



wait 10;

thread veh();
}

veh()
{
while(1)
{
veh = getent("veh","targetname");


veh playsound("sons_veh");
desti_veh = getent("veh_destination", "targetname");

veh.dest = desti_veh.origin ;
veh.start = veh.origin;

veh moveto(veh.dest, 35, 0.1, 0.1);
veh waittill("movedone");

veh.origin = veh.start;

wait 3;
}


}

See how short it is? And its working #1.

privateparts
June 27th, 2014, 14:29
ok i got the soundalias missing which is fine but i got this error

761


here is the script from main which i tried to adapt from yours
main()
{
maps\mp\_load::main();
maps\mp\mp_103_hanger_rotate::main();
maps\mp\mp_103_hanger_sound::main();



ambientPlay("ambient_backlot");


game["allies"] = "sas";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "woodland";
game["axis_soldiertype"] = "woodland";

setdvar( "r_specularcolorscale", "1" );

setdvar("r_glowbloomintensity0",".25");
setdvar("r_glowbloomintensity1",".25");
setdvar("r_glowskybleedintensity0",".3");
setdvar("compassmaxrange","1800");
wait 10;

thread veh();
}

veh()
{
while(1)
{
veh = getent("spit1","targetname");


veh playsound("sons_veh");
desti_veh = getent("veh_destination", "targetname");

veh.dest = desti_veh.origin ;
veh.start = veh.origin;

veh moveto(veh.dest, 35, 0.1, 0.1);
veh waittill("movedone");

veh.origin = veh.start;

wait 3;
}


}

CaptCom
June 27th, 2014, 18:16
I sent you all my files, run the map and you'll see its working. Then adapt the script to your files.

{OSG}Brodie
June 28th, 2014, 12:14
ok this is where im at with a modified version of Capts script thanks bud

working on hiding the planes whilst dormant
also redoing model in maya for landing gear up and tags for trail fx and blade spin



http://classic.xfire.com/video/6285a2/

CaptCom
June 28th, 2014, 12:27
Nice.... now give us your csv file ( the one in soundaliases ) please ;)
Because I can't make the sound working and I think private has the same problem ;)

{OSG}Brodie
June 28th, 2014, 13:30
soon as im finished bud

heres a wee update

i think your prob isnt the alias i think its the fact that you are calling it wrong

as in

veh.dest = desti_veh.origin ;
veh.start = veh.origin;
veh playloopsound ("spitfire");


veh moveto(veh.dest, 22, 0.1, 0.1);
veh waittill("movedone");
veh StopLoopSound ("spitfire");



http://classic.xfire.com/video/6285c3/

{OSG}Brodie
June 28th, 2014, 22:44
try this with 3 planes

5 in video watch 1080p

http://youtu.be/vkCeioOZI6A

main()
{
level thread planes();
}


planes()
{
level.PlaneSpeed = 16;


plane1 = getent ("plane1","targetname");
plane2 = getent ("plane2","targetname");
plane3 = getent ("plane3","targetname");


temp = getent (plane1.target,"targetname");
plane1.dest = temp.origin;
plane1.start = plane1.origin;
plane1 hide();


wait (0.5);


temp = getent (plane2.target,"targetname");
plane2.dest = temp.origin;
plane2.start = plane2.origin;
plane2 hide();


wait (0.5);


temp = getent (plane3.target,"targetname");
plane3.dest = temp.origin;
plane3.start = plane3.origin;
plane3 hide();


wait (2);


while (1)
{
plane1 thread plane_flyby("ac130");
wait (.15);
plane2 thread plane_flyby("ac130");
wait (.15);
plane3 thread plane_flyby("ac130");


wait (60);
}
}




plane_flyby(sound)
{
// If you specified a sound to play then play it


if (isdefined (sound) )
{
self playsound (sound);
}


wait (0.5); //Time after sound plays to move plane


//iprintln ("Watied 1 Sec. Show the Planes");


self show();


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


wait level.PlaneSpeed;


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

CaptCom
June 29th, 2014, 09:00
...

i think your prob isnt the alias i think its the fact that you are calling it wrong ....

I have no sounds in all my maps... I have 6 CoD5 maps almost ready to release. They all have multiple FX but no sounds.

{OSG}Brodie
June 29th, 2014, 09:07
I have no sounds in all my maps... I have 6 CoD5 maps almost ready to release. They all have multiple FX but no sounds.

erm ok sound aliases for cod5 are different and i havent as yet worked with cod5 sound wise so in cod5 i couldnt help you sorry

i know with cod4/5 xmodels etc are interchangeable but i know that sound aliases arent bud.

{OSG}Brodie
June 30th, 2014, 10:41
ok heres where im at atm nearly there

http://classic.xfire.com/video/6287c3/

{OSG}Brodie
July 1st, 2014, 09:28
heres where im at with it now after replacing ac130 with b17

http://youtu.be/8uJPA0kd55o

privateparts
July 1st, 2014, 11:02
wow matey well done that's amazing i got five plains in mine now thanks for your help and also a vehicle which i just need to tag a trigger to not sure how to do

{OSG}Brodie
July 1st, 2014, 11:47
tag a trigger for ? purpose

use the first script i sent you lol

privateparts
July 1st, 2014, 11:50
ok ill look at that

privateparts
July 3rd, 2014, 09:16
heres what i managed ive tried to add a trigger but nothing working yet still working at it lol slow learner the hissing in the video is a bit much as well.


https://www.youtube.com/watch?v=NZW-CguRVJ4&feature=youtu.be

{OSG}Brodie
July 3rd, 2014, 11:53
heres what i managed ive tried to add a trigger but nothing working yet still working at it lol slow learner the hissing in the video is a bit much as well.


https://www.youtube.com/watch?v=NZW-CguRVJ4&feature=youtu.be

Video

privateparts
July 4th, 2014, 03:48
I managed to add a rotate line in the script you helped me with here is a copy of my script

main()
{
thread veh();
thread veh1();
thread veh2();
thread veh3();
thread veh4();
thread veh5();
thread veh6();
thread veh7();
}

veh()
{
while(1)
{
veh = getent("veh","targetname");

desti_veh = getent("veh_destination", "targetname");

veh.dest = desti_veh.origin ;
veh.start = veh.origin;

veh playloopsound ("spitfire");
veh moveto(veh.dest, 32, 0.1, 0.1);
wait 7;
veh rotateroll( 360, 5, 0, 0 );
veh waittill("movedone");
veh StopLoopSound ("spitfire");

veh.origin = veh.start;
veh hide();
wait 60.5;
veh show();
}
}

veh1()
{
while(1)
{
veh1 = getent("veh1","targetname");


desti_veh1 = getent("veh_destination1", "targetname");

veh1.dest = desti_veh1.origin ;
veh1.start = veh1.origin;
veh1 playloopsound ("spitfire");

veh1 moveto(veh1.dest, 30, 0.1, 0.1);
veh1 waittill("movedone");
veh1 StopLoopSound ("spitfire");


veh1.origin = veh1.start;
veh1 hide();

wait 60.1;
veh1 show();
}
}

veh2()
{
while(1)
{
veh2 = getent("veh2","targetname");


desti_veh2 = getent("veh_destination2", "targetname");

veh2.dest = desti_veh2.origin ;
veh2.start = veh2.origin;
veh2 playloopsound ("spitfire");

veh2 moveto(veh2.dest, 37, 0.1, 0.1);
wait 4;
veh2 rotateroll( 180, 2, 0, 0 );
wait 6;
veh2 rotateroll( 180, 2, 0, 0 );

veh2 waittill("movedone");
veh2 StopLoopSound ("spitfire");


veh2.origin = veh2.start;
veh2 hide();

wait 60;
veh2 show();
}
}

veh3()
{
while(1)
{
veh3 = getent("veh3","targetname");


desti_veh3 = getent("veh_destination3", "targetname");

veh3.dest = desti_veh3.origin ;
veh3.start = veh3.origin;
veh3 playloopsound ("spitfire");

veh3 moveto(veh3.dest, 35, 0.1, 0.1);


veh3 waittill("movedone");
veh3 StopLoopSound ("spitfire");


veh3.origin = veh3.start;
veh3 hide();

wait 60.1;
veh3 show();
}
}

veh4()
{
while(1)
{
veh4 = getent("veh4","targetname");


desti_veh4 = getent("veh_destination4", "targetname");

veh4.dest = desti_veh4.origin ;
veh4.start = veh4.origin;
veh4 playloopsound ("spitfire");

veh4 moveto(veh4.dest, 32, 0.1, 0.1);

veh4 waittill("movedone");
veh4 StopLoopSound ("spitfire");


veh4.origin = veh4.start;
veh4 hide();

wait 68;
veh4 show();
}
}

veh5()
{
while(1)
{
veh5 = getent("veh5","targetname");


desti_veh5 = getent("veh_destination5", "targetname");


veh5.dest = desti_veh5.origin ;
wait 30;
veh5.start = veh5.origin;
veh5 playloopsound ("truck_passing");

veh5 moveto(veh5.dest, 24, 0.1, 0.1);

veh5 waittill("movedone");
veh5 StopLoopSound ("truck_passing");


veh5.origin = veh5.start;
veh5 hide();

wait 67;
veh5 show();
}
}

veh6()
{
while(1)
{
veh6 = getent("veh6","targetname");


desti_veh6 = getent("veh_destination6", "targetname");


veh6.dest = desti_veh6.origin ;
wait 33;
veh6.start = veh6.origin;
veh6 playloopsound ("jeep");

veh6 moveto(veh6.dest, 23, 0.1, 0.1);

veh6 waittill("movedone");
veh6 StopLoopSound ("jeep");


veh6.origin = veh6.start;
veh6 hide();

wait 65;
veh6 show();
}
}

veh7()
{
while(1)
{
veh7 = getent("veh7","targetname");


desti_veh7 = getent("veh_destination7", "targetname");

veh7.dest = desti_veh7.origin ;
veh7.start = veh7.origin;
veh7 playloopsound ("takeoff");

veh7 moveto(veh7.dest, 20, 0.1, 0.1);

veh7 waittill("movedone");
veh7 StopLoopSound ("takeoff");

veh7.origin = veh7.start;
veh7 hide();

wait 10;
veh7 show();
}
}

privateparts
July 4th, 2014, 04:01
as you can see i managed to manipulate the script to rotate the planes and have one flying upside down and then turn upright using a wait command between rotations in veh 2.

privateparts
July 4th, 2014, 07:51
here is my roation script and that is where i got the line from

main()
{
rotate_obj = getentarray("rotate","targetname");
if(isdefined(rotate_obj))
{
for(i=0;i<rotate_obj.size;i++)
{
rotate_obj[i] thread ra_rotate();
}
}
}

and i also looked at how the rotation might work with three values the same for movemnt and after a bit of experimenting hey presto i got it to work mmmmm it took me ages as well.

ra_rotate()
{
if (!isdefined(self.speed))
self.speed = 10;
if (!isdefined(self.script_noteworthy))
self.script_noteworthy = "z";

while(true)
{
// rotateYaw(float rot, float time, <float acceleration_time>, <float deceleration_time>);
if (self.script_noteworthy == "z")
self rotateYaw(360,self.speed);
else if (self.script_noteworthy == "x")
self rotateRoll(360,self.speed);
else if (self.script_noteworthy == "y")
self rotatePitch(360,self.speed);
wait ((self.speed)-0.1); // removes the slight hesitation that waittill("rotatedone"); gives.
// self waittill("rotatedone");
}
}

ArtSerjGaming
January 13th, 2017, 16:12
when I try to make a flying stukas from this example in my CoD5 its no working.
Sounds - yes but stukas no flying

MelVin
January 13th, 2017, 19:33
check your grammer/spelling and make sure to make all brushes and/or models into script_models and script_brushes. Once that is done, compile and re-test. If it's still broken, post your scripts. you can link to pastebin if that makes it easier. cheers

ArtSerjGaming
January 14th, 2017, 00:49
check your grammer/spelling and make sure to make all brushes and/or models into script_models and script_brushes. Once that is done, compile and re-test. If it's still broken, post your scripts. you can link to pastebin if that makes it easier. cheers

Hi!
I learned other scripts. Now I haven't files of planes which i made a planes from this tutorial.
But at the time I found the tutorial with stukas for CoD1 and then decided to check it out in CoD5 and it has work! )))