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

Members Online

»
0 Active | 76 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 subscribe
Author Topic: SCRIPT 2
baasje
General Member
Since: Oct 24, 2005
Posts: 23
Last: Mar 1, 2008
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Wednesday, Nov. 16, 2005 06:58 pm
hello , again whit the tutorial elevator in multyplayer i can make a elevator but how can i make the second 1 then there is a scipting error.
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Wednesday, Nov. 16, 2005 07:48 pm
Could you post the script? Also did you give things different targetnames than the first elevator?
Share |
baasje
General Member
Since: Oct 24, 2005
Posts: 23
Last: Mar 1, 2008
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Wednesday, Nov. 16, 2005 08:31 pm
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;
}

is the script what can i do to make the second lift and what is the new script? ive done it like this tutorial

edited on Nov. 16, 2005 03:34 pm by baasje
Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Wednesday, Nov. 16, 2005 08:46 pm
Hmm, not sure. What does the error message say when you try loading the map?
Share |
baasje
General Member
Since: Oct 24, 2005
Posts: 23
Last: Mar 1, 2008
[view latest posts]
Level 1
Category: CoDUO Mapping
Posted: Wednesday, Nov. 16, 2005 08:48 pm
uuhm i now how to make a elevator but i dont know how to make a second then a script file error comes see console for details. then i looked at the console

Bad syntax

Share |
Ace008
General Member
Since: Jul 22, 2005
Posts: 738
Last: Jan 3, 2009
[view latest posts]
Level 6
Category: CoDUO Mapping
Posted: Wednesday, Nov. 16, 2005 11:13 pm
I know people on here said to add +set developer 1 to the target in the CODUO icon, that way you will be able to see what the error is better. The only idea I have is make another elevator with a different targetname and everything else you put in to make the elevator work a different targetname than the first. Also you want the thread to have a different start. Like some of yours thread elevator_start();

try changing the 2nd elevators to thread elevator1_start(); or something like that. Sorry I can't explain this better I myself have a hard time with scripting let alone trying to explain it.
Share |
Restricted Access Topic is Locked 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

»