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: 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: Elevator wont work
Astarathia
General Member
Since: Jan 19, 2011
Posts: 2
Last: Jul 25, 2012
[view latest posts]
Level 0
Category: CoDUO Mapping
Posted: Wednesday, Jul. 25, 2012 12:15 pm
Dear modsonline community,

I built an elevator into my map and followed exactly the tutorial.

http://modsonline.com/Tutorials-read-169.html

I wanted to make my elevator start at the top and go down to the next position, but even when I copy pasted the script it didn't even move a centimetre. The brushmodel is targetname elevatormodel, the trigger use is the elevatorswitch...

I want it to move down by 1194 blocks in 11 seconds...
The model itself is 112 blocks high.

Here's the code:

Code:
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[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 = 2; 
height = 1192; 
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 (-1192,11,2,2); 
elevatormodel waittill ("movedone"); 
level.elevatorDown = true; 
} 
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 (1192,11,2,2); 
elevatormodel waittill ("movedone"); 
level.elevatorDown = false; 
} 
level.elevatorMoving2 = false; 
} 


Any ideas? Thx

edited on Jul. 25, 2012 08:37 am by Astarathia
Share |
Astarathia
General Member
Since: Jan 19, 2011
Posts: 2
Last: Jul 25, 2012
[view latest posts]
Level 0
Category: CoDUO Mapping
Posted: Wednesday, Jul. 25, 2012 03:38 pm
Noone ? [confused]
Share |
Johnno
General Member
Since: Mar 21, 2006
Posts: 160
Last: Dec 4, 2017
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDUO Mapping
Posted: Wednesday, Jul. 25, 2012 05:23 pm
I havn't used uo for a while now but i think that this used to work for me

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 = 226;
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;
}


Now i look at yours again, it looks the same, so it should work


edited on Jul. 25, 2012 10:23 am by Johnno

edited on Jul. 25, 2012 10:28 am by Johnno
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

»