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

Members Online

»
0 Active | 9 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
Category: CoD+UO Map + Mod Releases
Release announcements of custom maps and other content related to Call of Duty and Call of Duty United Offensive.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: The Dam
o0CAPPI0o
General Member
Since: Nov 14, 2004
Posts: 2
Last: Jan 28, 2008
[view latest posts]
Level 0
Category: CoD+UO Map + Mod Releases
Posted: Monday, Jan. 28, 2008 10:12 pm
Hiya Guys, i'm having a go at converting the Dam to multiplayer and i have it playable just having probs with the code for the elevators i have the top floor elevator working fine but the 2nd floor elevator wont stop at the 1st floor it just keeps going until it is in the sky above the dam and when this happens it affects elevator 1 instead of travelling back from floor one to top it goes down to floor two here is the code i am using

Code:
main() { 
level.elevatorDown = false; // 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[i] thread elevator_think(); 
} 

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

elevator_move() { 
elevatormodel = getentarray ("elevatormodel", "targetname"); 
level.elevatorMoving = true; 
speed = 2; 
height = 530; 
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 would love to get this map going in multiplayer and any help would be appreciated

p.s i dont have .map file its only bsp
Share |
o0CAPPI0o
General Member
Since: Nov 14, 2004
Posts: 2
Last: Jan 28, 2008
[view latest posts]
Level 0
Category: CoD+UO Map + Mod Releases
Posted: Monday, Jan. 28, 2008 10:29 pm
sorry wrong code here is the code i am presently using

Code:
// Original by lordblank
// Rewritten by Snake Shift

main() {
level.elevatorDown = false; // elevator starts at bottom: true/false
level.elevatorDown2 = true; // elevator starts at bottom: true/false
level.elevatorMoving = false; // elevator is not currently moving
thread elevator_start1();
thread elevator_start2();

}

elevator_start1() {
elevator = getentarray ("int_triggers1","targetname");
if ( isdefined(elevator) )
  for (i = 0; i < elevator.size; i++)
  elevator[i] thread elevator_think1();
}

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

elevator_move1() {

elevatormodel1 = getent ("elevator1", "targetname");
level.elevatorMoving = true;

speed = 10;
height = 530;

wait (1);

if (level.elevatorDown) { // moves to top
  elevatormodel1 moveZ (height, speed);
  elevatormodel1 waittill ("movedone");
  level.elevatorDown = false;

} else { // moves to bottom
  elevatormodel1 moveZ (height - (height * 2), speed);
  elevatormodel1 waittill ("movedone");
  level.elevatorDown = true;
}
level.elevatorMoving = false;
}


elevator_start2()
{
elevator = getentarray ("int_ele2","targetname");
if ( isdefined(elevator) )
  for (i = 0; i < elevator.size; i++)
  elevator[i] thread elevator_think2();
}

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

elevator_move2() {

elevatormodel2 = getent ("elevator2", "targetname");
level.elevatorMoving = true;

speed = 10;
height = 600;

wait (1);

if (level.elevatorDown2) { // moves to top
  elevatormodel2 moveZ (height, speed);
  elevatormodel2 waittill ("movedone");
  level.elevatorDown = false;

} else { // moves to bottom
  elevatormodel2 moveZ (height - (height * 2), speed);
  elevatormodel2 waittill ("movedone");
  level.elevatorDown2 = true;
  }
level.elevatorMoving = false;
}
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoD+UO Map + Mod Releases

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

»