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

Members Online

»
0 Active | 58 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
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Thursday, Aug. 2, 2007 03:06 am
I followed the tutorial, but it's still not working. Lets go over this again. In my map I have 3 script_model planes with target names of stuka 1, stuka 2, stuka 3, and they are all connected to their own script origin. I have a separate .gsc file called planes with the same script from the tutorial. In mymapname.gsc file I call upon the planes.gsc script. As for the csv file a made another one for the planes and copied the script but the sound doesn't work either. I didn't know what to name the second csv file. Do i really need to have 2 separate csv file? Why won't this work for me? The planes still appear when the map starts.
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Thursday, Aug. 2, 2007 03:26 am
ok let me revise my last post. i got it to work, sort of. the planes no longer appear when the map loads, but when they do appear only stuka1 flies. when it reaches its destinations the other 2 planes disappear. i want all 3 planes to fly together. and there is no sound fx. So i need to fix these 2 problems. please help me out thx.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Thursday, Aug. 2, 2007 10:40 am
The script looks ok to me, double check your keys and values in the models.

Also try this version of the script, I modified it slightly so it passes the origins to the flyby function directly.

Grassy


Code:

main()
{

level thread planes();
}

planes()
{
level.PlaneSpeed = 15;

stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
stuka3 = getent ("stuka3","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();

wait 2;

while (1)
{
  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;
  }
}


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

wait 1;

self show();

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

wait level.PlaneSpeed;

self hide();
self.origin = start;
}
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Thursday, Aug. 2, 2007 06:46 pm
what about the sound? I made a separate csv file like the tutorial said, but I dont know what to name it. Do I have to have 2 csv files? Can't I combine them? If so, how?
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 Scripting
Posted: Thursday, Aug. 2, 2007 07:02 pm
your .csv file needs to be named EXACTLY like your map.. so yes, you'll even HAVE to combine the two .csv files, because you can only have one .csv file with that exact name.

How? Just put everything in one .csv file..

edited on Aug. 2, 2007 03:05 pm by The_Caretaker
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 12:29 am
So i put everything in one .csv file, but I get an error when I try and start cod2. Something about min_volume or whatever. This is what my script now looks like. Check it over please.

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

#Ambiance,,,,,,,,,,,,,,,,,,,,,,,
ambient_mp_skyscraper,,ambient/amb_Russia03_ext.mp3,0.4,,,,,,,local,streamed,,looping,,mp_skyscraper,,,,,,,,

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,,,,,,,,




Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 01:54 am
The commas are "delimeters" between each parameter.
No wonder you dont hear anything, you have a min value greater than 1 and no max value in the volume parameters.

If you dont understand the exact parameters, I suggets you use the settings of a stock sound and just change the filename, leave the standard parameters alone.

Grassy
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 03:06 am
well i just used what the tutorial said to do. can you just tell me how I can edit my script to make it work please.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 11:49 am
Ok here is a new soundalias file for your map.

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

null,,null.wav,,,,,,,,,,,,,,,,,,,

#Ambiance,,,,,,,,,,,,,,,,,,,,,,,

ambient_mp_skyscraper,,ambient/amb_russia03_ext.mp3,0.7,,ambience,,,,,local,streamed,,looping,,mp_skyscraper,,,,,,ambience

#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.68,,na,0.4,0.7,50,5000,auto,,,looping,,mp_skyscraper


Code modified to play loopsounds:
Code:

main()
{

level thread planes();
}

planes()
{
level.PlaneSpeed = 15;

stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
stuka3 = getent ("stuka3","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();

wait 2;

while (1)
{
  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;
  }
}


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;
}


Grassy
Share |
TheArmy
General Member
Since: Jun 24, 2006
Posts: 599
Last: Dec 25, 2009
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 11:26 pm
ok so after using ur scripts i am now getting sounds. there is still a problem though. only stuka1 flies. stuka2 and stuka3 do not move and when stuka1 reaches it's destination stuka2 and stuka3 disappear and the process repeats.
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

»