Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 91 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
Author Topic: flying planes
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Saturday, Aug. 4, 2007 10:51 pm
Ok, well are those two planes script_models, are they each targeting a script_origin?
I'm all out of ideas now, if model 1 works, there is no reason why the rest dont, the routines are the same for each model.

Grassy
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Saturday, Aug. 4, 2007 11:27 pm
should the script u gave me have the 3 planes fly at the same exact time?
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Sunday, Aug. 5, 2007 03:11 am
ok things seem to be working. couple of things though.
1) I want to double the speed of the planes, how do I do that?
2) The 3 planes seem to either be going at different speeds or they are starting at different times because the planes should be moving together, but after about 2 seconds one of the planes has a noticeable lead on the other 2.

edited on Aug. 4, 2007 11:17 pm by TheArmy
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Sunday, Aug. 5, 2007 03:27 am
Ok whats happening with my second statement is the planes are spawning at different times. Stuka1 spawns slightly before stuka2 which spawns slightly before stuka3. How do I fix this?
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Sunday, Aug. 5, 2007 03:52 am
im sry for the confusion. i just need to know how to make the planes fly faster.
Share |
TexasRebel
General Member
Since: May 1, 2006
Posts: 373
Last: Aug 20, 2013
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Sunday, Aug. 5, 2007 03:56 am
to double the speed

change level.PlaneSpeed = 15;

to

level.PlaneSpeed = 30;

and if you look at this section of the script . . . it will explain why the planes spawn apart from each other.

Code:
  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;


it executes the plane_flyby function for stuka1 and then waits .15 seconds before it executes the same function for stuka2 and so on.
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Sunday, Aug. 5, 2007 08:33 pm
Ok thank you all so much for your help. I don't know why this was so difficult to do. Was wondering though id there was a way to make the planes do any cool tricks in the air such as a barrel roll or something.
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 01:46 am
I want to make the planes louder. Which number(s) do I adjust?

#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.75,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Monday, Aug. 6, 2007 06:32 pm
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

it's in there...
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Wednesday, Aug. 29, 2007 05:02 am
I tried adding an addition 5 planes to my map and script and called them stuka4-8, but they don't fly. I don't know why the 5 additional planes aren't working. I just copied the script and changed the numbers and I double checked my values in radiant. Can someone please check my script maybe I did something wrong.

Code:
main()
{

level thread planes();
}

planes()
{
level.PlaneSpeed = 30;

stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
stuka3 = getent ("stuka3","targetname");
stuka4 = getent ("stuka4","targetname");
stuka5 = getent ("stuka5","targetname");
stuka6 = getent ("stuka6","targetname");
stuka7 = getent ("stuka7","targetname");
stuka8 = getent ("stuka8","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();

temp4 = getent (stuka4.target,"targetname");
//stuka4.dest = temp.origin;
org4 = temp4.origin;
//stuka4.start = stuka4.origin;
start4 = stuka4.origin;
stuka4 hide();

temp5 = getent (stuka5.target,"targetname");
//stuka5.dest = temp.origin;
org5 = temp5.origin;
//stuka5.start = stuka5.origin;
start5 = stuka5.origin;
stuka5 hide();

temp6 = getent (stuka6.target,"targetname");
//stuka6.dest = temp.origin;
org6 = temp6.origin;
//stuka6.start = stuka6.origin;
start6 = stuka6.origin;
stuka6 hide();

temp7 = getent (stuka7.target,"targetname");
//stuka7.dest = temp.origin;
org7 = temp7.origin;
//stuka7.start = stuka7.origin;
start7 = stuka7.origin;
stuka7 hide();

temp8 = getent (stuka8.target,"targetname");
//stuka8.dest = temp.origin;
org8 = temp8.origin;
//stuka8.start = stuka8.origin;
start8 = stuka8.origin;
stuka8 hide();

wait 2;

while (1)
{
  stuka1 thread plane_flyby(org1,start1,"stuka_flyby");
  wait 0;
  stuka2 thread plane_flyby(org2,start2,"stuka_flyby");
  wait 0;
  stuka3 thread plane_flyby(org3,start3,"stuka_flyby");
  wait 0;
  stuka4 thread plane_flyby(org4,start4,"stuka_flyby");
  wait 0;
  stuka5 thread plane_flyby(org5,start5,"stuka_flyby");
  wait 0;
  stuka6 thread plane_flyby(org6,start6,"stuka_flyby");
  wait 0;
  stuka7 thread plane_flyby(org7,start7,"stuka_flyby");
  wait 0;
  stuka8 thread plane_flyby(org8,start8,"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;
}
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»