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

Members Online

»
0 Active | 124 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
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
Author Topic: Plane sounds Pt 2 ?!
paulo88
General Member
Since: Apr 18, 2005
Posts: 573
Last: May 8, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Monday, Sep. 26, 2005 11:08 pm
I would rather work out how to do it properly. I know it can be done as I have a map on my PC in which 2 spitfires fly over. I've add a look at the csv in that and its exactly like mine. Which is why its so frustrating !!

According to the descriptions in my .csv file you should be able to hear the planes 1000000 inches away from them !

Is this IN GAMES inches ? if so how do you work the scale out ?
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Tuesday, Sep. 27, 2005 04:12 am
Quote:
Is this IN GAMES inches ? if so how do you work the scale out ?


Here ya go! :)

Quote:
What are the player dimensions in a map?
The unit scale in CoD seems to be about 1 unit : 1 inch. (roughly)

1 unit = 1 inch in CoD.
1 foot = 12 units in CoD.

Players are 72 units or 6 feet high.
Players are 32 units wide.

Stairs in CoD are 8-12 units high.
Doors are 52x96 units in CoD (dawnville). Door thickness is 4-6 units.

Ladder rungs on a ladder that is in Dawnville are 24 units appart.It looks kind of silly. In real life this would be more like 12 units.

Outter walls are 8 units thick. I made inner walls 6.

Sidewalks 64 units wide and 8 units high

Height to ceiling is normally 128, but then again it all depends if its a anormal room, warehouse or what your creating.

Player Height Clearance =< 71 units
Player Crouch Clearance =< 51 units
Player Prone Clearance =< 31 units
Player Max Jump =< 39 units
Player Width Clearance =< 31 units
Share |
paulo88
General Member
Since: Apr 18, 2005
Posts: 573
Last: May 8, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Tuesday, Sep. 27, 2005 08:46 am
so having a min distance of 1000000 should well cover my map ! [banghead]
I've managed to solve many problems with my map, but this is just crazy !?

If I post all my gsc and csv files will somebody look for a blatant error. If not these dam planes are coming out as there the only thing now stopping my map from next beta release.

Paul[sad]
Share |
|OCG|=gLiTcH=
General Member
Since: Mar 6, 2004
Posts: 23
Last: May 4, 2006
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Tuesday, Sep. 27, 2005 09:19 am
Don't know if this will help...but you can tear it apart. I used this for the destroyed village map I converted. Just change the plane type, flight paths (up top) and the sound location (under Plane_Sound).

Code:

//|OCG|=gLiTcH=

main() 
{ 

	precachemodel("xmodel/v_us_air_p47");
	level thread Random_Plane_FlyBy(); 
}

#using_animtree ("stuka");
Random_Plane_FlyBy()
{
	path_start = [];
	path_end = [];
	path_start[0] = (-4038, 1712, 1332);
	path_end[0] = (1354, -4233, 1171);
	path_snd_delay[0] = 1;
	path_start[1] = (-4, 2144, 1216);
	path_end[1] = (-4269, -4234, 1496);
	path_snd_delay[1] = 0;

//Time = Distance / Speed
//
//Distance = Time * Speed
//
//Speed = Distance / Time
	wait (45 + randomint(45));

	level.plane_flybys = 1;
	while(1)
	{
		// Choose Random Path
		random_path = randomint(path_start.size);
		the_path_start = path_start[random_path];
		the_path_end = path_end[random_path];

		side = randomint(2);

		if(side == 1)
		{
			startpos = the_path_start;
			endpos = the_path_end;
		}
		else
		{
			startpos = the_path_end;
			endpos = the_path_start;
		}

		sound_delay = path_snd_delay[random_path];

		speed = (1050  + randomint(500));
		dist = distance(startpos,endpos);
	
		time = (dist / speed);

		num_of_planes = 1 + randomint(2);
		println("num_of_planes ", num_of_planes);
		for(i=0;i<num_of_planes;i++)
		{
			level.plane_flybys--;
			random_x = (startpos[0] - 512) + randomfloat(512);
			random_y = (startpos[1] - 512) + randomfloat(512);
			random_z = (startpos[2] - 64) + randomfloat(512);
			offset = (random_x, random_y, random_z);

//			println("OFFSET = ",offset);

			plane = spawn("script_model", offset);
			plane setmodel("xmodel/v_us_air_p47");
			plane thread Plane_Move(startpos,endpos,time, sound_delay);
			wait (0.5 + randomfloat(2));
		}

//		println("PLANE GROUPS : ",level.plane_flybys);

		while(level.plane_flybys <= 0)
		{
			wait 1;
		}

		wait (45 + randomint(45));
	}
}

do_line()
{
	self endon("death");
	while(1)
	{
		line(self.origin, (0,0,0),(1,1,1));
		print3d((self.origin + (0,0,50)), self.angles, (1,1,1));
		wait 0.05;
	}
}

Plane_Move(startpos,endpos,time, sound_delay)
{
	self moveto(endpos, time, 0, 0);
	self.angles = vectortoangles (endpos - startpos);
	self thread Plane_Rotate();
	level thread Plane_Sound(sound_delay);

	self waittill("movedone");
	level.plane_flybys++;
	
	println("Deleting plane.");
	self delete();
}

Plane_Rotate()
{
	self endon("death");
	og_angles = self.angles;

	while(1)
	{
		random_x = og_angles[2] + (-45 + randomfloat(30));
		random_y = og_angles[0] + (-5 + randomfloat(10));
		random_time = 2 + randomfloat(5);
		offset = (random_y, og_angles[1], random_x);

		self rotateto(offset, random_time, 0.5, 0.5);
		self waittill("rotatedone");
	}
}

Plane_Sound(sound_delay)
{
	org = spawn("script_model",(-1601,-1101,1801));
	
	org SetContents(0);
	wait 0.1;
	random_num = randomint(2);
	if(random_num == 0)
	{
		alias = "bf109_attack03";
		sound_wait = .1;
	}
	else
	{
		alias = "bf109_attack04";
		sound_wait = .2;
	}

	//if(isdefined(sound_delay))
	//{
	//	wait sound_delay;
	//}

	println("^5Playing Sound " + alias + " wait: " + sound_wait);
	org playsound (alias);
	wait sound_wait;
	println("DELETE!");
	org delete();
}

do_line2()
{
	self endon("death");
	while(1)
	{
		line(self.origin, (self.origin + (0,0,1000)),(1,0,0));
		wait 0.05;
	}
}
Share |
paulo88
General Member
Since: Apr 18, 2005
Posts: 573
Last: May 8, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Tuesday, Sep. 27, 2005 09:25 am
cheers glitch,
how do I put the models in the map. Do they need an original or does the script place them in there !?

Im still trying get my head around scripting sorry !

Ps Im using the same planes ! so its just acase of altering flight paths etc !


edited on Sep. 27, 2005 04:28 am by paulo88
Share |
paulo88
General Member
Since: Apr 18, 2005
Posts: 573
Last: May 8, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Tuesday, Sep. 27, 2005 09:55 am
OK, I've put your script in and replaced my existing planes.gsc. I can now see "your" planes flying across the map! (and mine sat in their origin positions LOL)

But... still no sounds with them ?
Share |
RRRScorpion
General Member
Since: Feb 2, 2004
Posts: 169
Last: Dec 3, 2005
[view latest posts]
Level 4
Category: CoDUO Mapping
Posted: Tuesday, Sep. 27, 2005 10:26 am
This might be an obvious question, but your stukas have different target names and they correspond to the names in your gsc file? Stuka1, 2 and 3 right?

Post ya gsc and csv files so we can examine them m8y.

Scorps

edited on Sep. 27, 2005 05:29 am by RRRScorpion
Share |
paulo88
General Member
Since: Apr 18, 2005
Posts: 573
Last: May 8, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Tuesday, Sep. 27, 2005 11:00 am
"takes deep Breath"

OK, I have 2 planes in my map (targetnames : stuka1 & stuka2) I've then placed a script origin where I want them to fly to. Then done the usual CTRL K and connected them up.
Then placed a script_origin under each plane. Planes fly through map as they should.

Heres mymap.gsc

Quote:
main()
{

setCullFog (0, 3000, .32, .36, .40, 0 );
ambientPlay("ambient_mp_brecourt");

maps\mp\_load::main();
maps\mp\planes::main();
level thread maps\mp\_tankdrive_gmi::main();//for tanks
level thread maps\mp\_jeepdrive_gmi::main();//for jeeps
level thread maps\mp\_flak_gmi::main();//for flak88s
level thread maps\mp\Haugesund_Docks_fx::main();

flak = getent("flak1","targetname");// Without this it does not work!!

flak maps\mp\_flakvierling::init();// Without this it does not work!!


game["allies"] = "american";
game["axis"] = "german";
game["hud_allies_victory_image"] = "gfx/hud/hud@mp_victory_foy_us.dds";
game["hud_axis_victory_image"] = "gfx/hud/hud@mp_victory_foy_g.dds";
game["attackers"] = "allies";
game["defenders"] = "axis";

game["american_soldiertype"] = "airborne";
game["american_soldiervariation"] = "winter";
game["german_soldiertype"] = "wehrmacht";
game["german_soldiervariation"] = "winter";

game["ctf_layoutimage"] = "Haugesund_docks";
game["dom_layoutimage"] = "Haugesund_docks";

}


Heres my planes.gsc

Quote:
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();

wait 15;

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

wait 60;
}
}


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

wait 5;

self show();

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

wait level.PlaneSpeed;

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


Heres mymap soundaliases.csv

Quote:
"# If the text in the first column of a row starts with a # character, the row is ignored",,
,,"If the first column for a row is blank, then the row is ignored"
# The first non-comment line of a sound alias file specifies the key name for all values appearing in this column.,,
"# This means it is safe to swap entire columns around, though you should never swap partial columns.",,
"# You can invent new keys, but the game will ignore them if it doesn't know about them.",,
"# You can leave out keys, but the ""name"" and ""file"" keys must always be present.",,

,name,name of the alias that is used to play this sound (required)
,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)"
,file,the name of the file that contains the sound data (required)
,vol_min,"0 is silent, 1 is full volume (default = 1)"
,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)"
,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)"
,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)"
,dist_min,"within this distance in inches, the sound is always full volume (default = 120)"
,dist_max,"outside this distance in inches, the sound is not started. If left blank or set to 0, the sound will play from any distance. This does not affect sound volume falloff."
,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)",,,,,,,,,,,,,
,type,streamed / loaded (default = loaded),,,,,,,,,,,,,
,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1),,,,,,,,,,,,,
,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")",,,,,,,,,,,,,
,masterslave,"if ""master"", this is a master sound. If a number, then this sound won't exceed this volume whenever any master sound is playing. If blank, then neither master nor slave.",,,,,,,,,,,,,
,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"". If blank, the alias is used on all maps.",,,,,,,,,,,,,

name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle

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

flak_single,,weapons/flak/flak_single.wav,1,1,,,300,1020,auto,,,,,,


stuka_flyby,,vehicles/bf109_attack02c.wav,1.25,,,,100000,,,,,,,,



and finally heres mymap soundloadspecs.csv

Quote:
#DEFAULTS
dialog_mp.csv
gmi_dialog_mp.csv
generic_mp_sound.csv
gmi_mp_weap_all_allied.csv
gmi_mp_artillery.csv
haugesund_docks.csv


#VEHICLE
gmi_mp_vehicles_ru.csv
gmi_mp_vehicles_ge.csv
gmi_mp_vehicles_us.csv





[wave][thumbs_up] Quite a lot to look at and your help is very, very apprecaited.

Paul
Share |
stranger
General Member
Since: Jun 26, 2004
Posts: 25
Last: Sep 27, 2005
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Tuesday, Sep. 27, 2005 11:07 am
Lo.

[biggrin] [biggrin]

Still solving your problem with the stuka sounds.

[biggrin]

Good Luck.

Start scripting yourself or try.



edited on Sep. 27, 2005 06:15 am by stranger
Share |
paulo88
General Member
Since: Apr 18, 2005
Posts: 573
Last: May 8, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Tuesday, Sep. 27, 2005 11:21 am
mmm yes, very helpfull !

I am trying to start scripting. thats why Im having trouble with these dam planes.

Sorry, if I sound a bit snappy but I've been staring at this script for nearly 48 hours now ! [cry][crazy]
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

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

»