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

Members Online

»
0 Active | 8 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

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 subscribe
Author Topic: cod script help :'(
thomasbeech
General Member
Since: Aug 10, 2008
Posts: 30
Last: Jan 28, 2010
[view latest posts]
Level 2
Category: CoD2 MP Mapping
Posted: Monday, Jan. 5, 2009 06:53 pm
erm hi guys,

I was following the lift tutorial and ther is somthig i dobt get, i had to make a gsc file with this in it,main() {
level.elevatorDown = true; // elevator starts at bottom: true/false
level.elevatorMoving = false; // elevator is not currently moving
thread elevator_start();
}

elevator_start() {
elevator = getentarray ("elevatorswitch","targetname");
if ( isdefined(elevator) )
for (i = 0; i < elevator.size; i++)
elevator 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 = 2;
height = 192;
wait (1);
if (level.elevatorDown) { // moves to top
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, speed);
elevatormodel waittill ("movedone");
level.elevatorDown = false;
}
else { // moves to bottom
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;
}

i did that and the guy sed call it what ever you want aslong as you cal it up in your main gsc, now thats what i dont get, how do i call it up in my mp_mapname gsc ???
Share |
CoDLiNK
General Member
Since: Mar 16, 2008
Posts: 178
Last: Sep 28, 2009
[view latest posts]
Level 4
Category: CoD2 MP Mapping
Posted: Monday, Jan. 5, 2009 07:27 pm
you call it whatever you saved the gsc file as.

So if you saved it as "elevator.gsc" then you would call it in your mp_yourmapname.gsc.

Like this..

maps\mp\elevator::main();

Put this line above the _load::main();

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

	game["allies"] = "sas";
	game["axis"] = "russian";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "woodland";
	game["axis_soldiertype"] = "woodland";

}


This is just an example, it's from COD 4. (which is the same) Do not copy and paste this to use. It is an example of where to put the line!

Hope this helps

You will aslo have to add the line in your csv file (or update zone file)

rawfile,maps/mp/elevator.gsc

edited on Jan. 5, 2009 02:30 pm by CoDLiNK
Share |
Restricted Access Topic is Locked 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

»