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

Members Online

»
0 Active | 49 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 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Help
coldroll
General Member
Since: Jul 5, 2006
Posts: 159
Last: Aug 24, 2007
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Saturday, Mar. 31, 2007 07:22 pm
can someone give me a link to call of duty 2 maps with elevators.[machine_gun][sniper]
Share |
argh00
General Member
Since: Aug 31, 2005
Posts: 138
Last: Apr 1, 2007
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Saturday, Mar. 31, 2007 07:24 pm
Here
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 MP Mapping
Posted: Saturday, Mar. 31, 2007 07:31 pm
If you want to learn how to make elevators in CoD2... there is a tutorial in the CoD section. It works the same way in CoD2.
Share |
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Wednesday, Apr. 11, 2007 12:37 am
That tut is ok, but where do you put the gsc, and what about the sound scripting? What sound should it call on? Where does the sound scripting go?
Share |
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Wednesday, Apr. 11, 2007 12:50 am
Marlow writes...
Quote:
That tut is ok, but where do you put the gsc, and what about the sound scripting? What sound should it call on? Where does the sound scripting go?

i followed the directions to the letter.. When I go into the map, the use icon appears, but the switch does nothing.
Share |
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Wednesday, Apr. 11, 2007 01:04 am
OK, I've tracked the problem down to the scripting in my gsc file... I don't know how to fit in the code suggested in the tut. Can someone help?


This is what I have that works (where and what do I put in if I followed the old COD tut for elevators?):
Code:
main()
{
	maps\mp\_load::main();

	level thread weaponrespawner("weapons", 5);

	ambientPlay("ambient_mp_msp4");
	
	game["allies"] = "american";
	game["axis"] = "german";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["american_soldiertype"] = "normandy";
	game["german_soldiertype"] = "normandy";

                // Set some cvars
                setcvar("r_glowbloomintensity0","1");
	setcvar("r_glowbloomintensity1","1");
	setcvar("r_glowskybleedintensity0",".5");
}

weaponrespawner(targetname, defaultrespawndelay)
{
weapons = getentarray(targetname, "targetname");
if(weapons.size > 0)
{
	for(i=0; i < weapons.size; i++) 
{
if(!isdefined(weapons[i].script_timescale))
weapons[i].script_timescale = defaultrespawndelay;

// kick off a thread to listen for when the item gets 

picked up
	weapons[i] thread 

weapon_think(weapons[i].script_timescale);
}
}
}

 

// self = weapon reference
weapon_think(delaytime)
{

// capture important weapon data first to allow us to 

respawn them

	classname = self.classname;
	model = self.model;
	count = self.count;
	org = self.origin;
	angles = self.angles;
	targetname = self.targetname;

// Wait till the weapon gets picked up
	self waittill("trigger");

// Wait the delay before respawn
	wait delaytime;

// respawn the weapon
	weapon = spawn(classname, org);
	weapon.angles = angles;
	weapon.count = count;
	weapon setmodel(model); 
	weapon.script_timescale = delaytime;
	weapon.targetname = targetname;
// Kick off a new thread with the new weapon and kill 

the old one
	weapon thread weapon_think(delaytime);
}


This still doesn't resolve the sounds issue, but i'll search for topics on that. Thanks all..
Share |
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Wednesday, Apr. 11, 2007 01:39 am
Sorry about the redundant posts, but I'm not allowed to edit.. At any rate, I've cleaned up what I have that works and I've also simplified what I think needs to go in.. I still can't figure out how to splice it in. Can you help?

What I have that works:
Code:
main()
{
	maps\mp\_load::main();

	level thread weaponrespawner("weapons", 5);

	ambientPlay("ambient_mp_msp4");
	
	game["allies"] = "american";
	game["axis"] = "german";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["american_soldiertype"] = "normandy";
	game["german_soldiertype"] = "normandy";

        setcvar("r_glowbloomintensity0","1");
	setcvar("r_glowbloomintensity1","1");
	setcvar("r_glowskybleedintensity0",".5");
}

	weaponrespawner(targetname, defaultrespawndelay)
{
	weapons = getentarray(targetname, "targetname");
	if(weapons.size > 0)
{
	for(i=0; i < weapons.size; i++) 
{
	if(!isdefined(weapons[i].script_timescale))
	weapons[i].script_timescale = defaultrespawndelay;

	weapons[i] thread 	weapon_think(weapons[i].script_timescale);
}
}
}

 

	weapon_think(delaytime)
{
	classname = self.classname;
	model = self.model;
	count = self.count;
	org = self.origin;
	angles = self.angles;
	targetname = self.targetname;
	self waittill("trigger");
	wait delaytime;
	weapon = spawn(classname, org);
	weapon.angles = angles;
	weapon.count = count;
	weapon setmodel(model); 
	weapon.script_timescale = delaytime;
	weapon.targetname = targetname;
	weapon thread weapon_think(delaytime);
}


What I need to incorporate according to the tut:
Code:

{
	level.elevatorDown = true; 
	level.elevatorMoving = false; 
	thread elevator_start();
}

	elevator_start() 
{
	elevator = getentarray ("elevatorswitch","targetname");
	if ( isdefined(elevator) )
	for (i = 0; i < elevator.size; i++)
	elevator[i] thread elevator_think();
}

	elevator_think() 
{
	while (1) 
{
	self waittill ("trigger");
	if (!level.elevatorMoving)
	thread elevator_move();
}
}

	elevator_move() 
{
	elevatormodel = getent ("elevatormodel", "targetname");
	level.elevatorMoving = true;
	speed = 5;
	height = 192;
	wait (1);
	if (level.elevatorDown) 
{ 
	elevatormodel playsound ("elevator1"); 
	wait (1); 
	elevatormodel moveZ (height, speed);
	elevatormodel waittill ("movedone");
	level.elevatorDown = false;
}
	else 
{ 
	elevatormodel playsound ("elevator1"); 
	wait (1);  
	elevatormodel moveZ (height - (height * 2), speed);
	elevatormodel waittill ("movedone");
	level.elevatorDown = true;
}
	level.elevatorMoving = false;
}
Share |
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Wednesday, Apr. 11, 2007 03:36 am
After several hours of tinkering, I've got this scripting working... What I lack in intelligence and experience, I certainly have in persistence... At any rate, here is the code that worked... I was neglecting to see that part of the code had to be grouped with the first section and the others had to stand alone...

Code:
main()
{
	maps\mp\_load::main();

	level thread weaponrespawner("weapons", 1);
	level.elevatorDown = true;
	level.elevatorMoving = false;
	thread elevator_start();

	ambientPlay("ambient_mp_msp4");
	
	game["allies"] = "american";
	game["axis"] = "german";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["american_soldiertype"] = "normandy";
	game["german_soldiertype"] = "normandy";

        setcvar("r_glowbloomintensity0","1");
	setcvar("r_glowbloomintensity1","1");
	setcvar("r_glowskybleedintensity0",".5");


}

	weaponrespawner(targetname, defaultrespawndelay)
{
	weapons = getentarray(targetname, "targetname");
	if(weapons.size > 0)
{
	for(i=0; i < weapons.size; i++) 
{
	if(!isdefined(weapons[i].script_timescale))
	weapons[i].script_timescale = defaultrespawndelay;

	weapons[i] thread 		
	weapon_think(weapons[i].script_timescale);
}
}
}

 

	weapon_think(delaytime)
{
	classname = self.classname;
	model = self.model;
	count = self.count;
	org = self.origin;
	angles = self.angles;
	targetname = self.targetname;
	self waittill("trigger");
	wait delaytime;
	weapon = spawn(classname, org);
	weapon.angles = angles;
	weapon.count = count;
	weapon setmodel(model); 
	weapon.script_timescale = delaytime;
	weapon.targetname = targetname;
	weapon thread weapon_think(delaytime);
}
	
	elevator_start()
{
	elevator = getentarray ("elevatorswitch","targetname");
	if ( isdefined(elevator) )
	for (i = 0; i < elevator.size; i++)
	elevator[i] thread elevator_think();
}

	elevator_think() 
{
	while (1) 
{
	self waittill ("trigger");
	if (!level.elevatorMoving)
	thread elevator_move();
}
}

	elevator_move() 
{
	elevatormodel = getent ("elevatormodel", "targetname");
	level.elevatorMoving = true;
	speed = 5;
	height = 1608;
	wait (1);
	if (level.elevatorDown) 
{
	elevatormodel playsound ("elevator1"); // sound definition for soundaliases.csv
	wait (1);
	elevatormodel moveZ (height, speed);
	elevatormodel waittill ("movedone");
	level.elevatorDown = false;
}
	else 
{
	elevatormodel playsound ("elevator1"); // sound definition for soundaliases.csv
	wait (1);  // wait a second to hear the motor start and then start the movement of the lift - feels more realistic
	elevatormodel moveZ (height - (height * 2), speed);
	elevatormodel waittill ("movedone");
	level.elevatorDown = true;
}
	level.elevatorMoving = false;
}


No then, here's where I'm currently stuck... I have a long elevator shaft and the elevator itself travels a long way... The trigger stays at the bottom (it is not a part of the elevator, though I wish it was). The TUT doesn't explain how to make the button part of the elevator or how to add two buttons (one at the bottom AND top). I tried two things, one long ass trigger and two triggers.. Both times the use function seemed to disappear once I got in the map.. So, how do I either attach the button, or have two buttons.. Still don't know about the sounds.

edited on Apr. 10, 2007 11:41 pm by Marlow
Share |
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Thursday, Apr. 12, 2007 07:42 pm
Still can't get the sound to work using the elevator tut...
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD2 MP Mapping
Posted: Thursday, Apr. 12, 2007 07:47 pm
have you made a .csv file? and if so.. post it.
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP 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

»