MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
{PP}Bloodl... [Forum]
atudisturbed [Downl]
Brad6566 [Banne]
bhutchinso... [Downl]

4 Members and 12 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Sunday, Jan. 4th
MODSonair 161 Live
Friday, Jan. 2nd
MODSonair Episode 160
Thursday, Jan. 1st
HAPPY NEW YEAR MODSONLINE AND ALL
Sunday, Dec. 28th
MODSonair 160 Live
Saturday, Dec. 27th
MODSonline Holiday Pwnage
Latest Poll
Modsonair audio or video?
Video from here on. 48.57%
Sticking with audio. 2.86%
Either is good. 17.14%
What is modsonair? 31.43%
Read More...
4 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
How 'bout law?
MODSonline.. Posts: (4) Views: (28) by tomalla
Secret Keypad Door.... Help :'(
CoD 2 Level Desi.. Posts: (1) Views: (13) by NotDeadYet
Zombies Crashing?
CoD:WW Zombie/Co.. Posts: (3) Views: (23) by Sgt.Rampage
More dead bodies
CoD 4 Scripting.. Posts: (2) Views: (16) by Sevenz
Google 468 Banner Half-Life 2 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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: CoD 2 Level Design
CoD 2 mapping and level design.
Moderators: foyleman, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, supersword, batistablr, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access
Page
Next Page
subscribe
Author Topic: Help
coldroll
General Member
Since: Jul 4, 2006
Posts: 159
Last: Aug 24, 2007
[view latest posts]
Level 4
Category: CoD 2 Level Design
Posted: Saturday, Mar. 31, 2007 03:22 pm
can someone give me a link to call of duty 2 maps with elevators.[machine_gun][sniper]
argh00
General Member
Since: Aug 31, 2005
Posts: 138
Last: Apr 1, 2007
[view latest posts]
Level 4
Category: CoD 2 Level Design
Posted: Saturday, Mar. 31, 2007 03:24 pm
Here
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11622
Last: Jan 3, 2009
[view latest posts]
Level 10
Forum Moderator
Category: CoD 2 Level Design
Posted: Saturday, Mar. 31, 2007 03: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.
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD 2 Level Design
Posted: Tuesday, Apr. 10, 2007 08:37 pm
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?
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD 2 Level Design
Posted: Tuesday, Apr. 10, 2007 08:50 pm
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.
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD 2 Level Design
Posted: Tuesday, Apr. 10, 2007 09:04 pm
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..
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD 2 Level Design
Posted: Tuesday, Apr. 10, 2007 09:39 pm
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;
}
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD 2 Level Design
Posted: Tuesday, Apr. 10, 2007 11:36 pm
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
Marlow
General Member
Since: Jun 27, 2006
Posts: 150
Last: Mar 6, 2008
[view latest posts]
Level 4
Category: CoD 2 Level Design
Posted: Thursday, Apr. 12, 2007 03:42 pm
Still can't get the sound to work using the elevator tut...
The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11622
Last: Jan 3, 2009
[view latest posts]
Level 10
Forum Moderator
Category: CoD 2 Level Design
Posted: Thursday, Apr. 12, 2007 03:47 pm
have you made a .csv file? and if so.. post it.
Restricted Access Restricted Access
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD 2 Level Design
All logos and trademarks and information in this site are property of MODSonline LLC © 2009.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Intergi
Partners
CODAddicts - Call of Duty News & Downloads
Battle for Europe COD2
XoXide
Call of Duty Headquarters
modbase.be
The Firing Box
Frag Universe
Ask About
Advertising
Friends
MODS Reloaded
Canada Kicks Ass Clan
The Clan Database
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 160
MODSonair Episode 159
MODSonair Episode 158
MODSonair Episode 157
MODSonair Episode 156
Next Show
The next MODSonair show will air LIVE on:
01/11/2009 12:00 EST

Time remaining:
Copyright © 2009 MODSonline
Tresware Content Management System Copyright © 2009 Tresware
Website Designed and Hosted   Tresware