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

Members Online

»
0 Active | 91 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 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Elevator
Tenshii
General Member
Since: Jan 23, 2008
Posts: 42
Last: Feb 5, 2008
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Friday, Feb. 1, 2008 05:55 pm
Hi! I'm trying to create an elevator that can move to and from and between certain floors. (More than 2) Any way I can do this? All the tuts I've seen so far, either don't explain enough, or have very bad translations :/
Anyone got any ideas?
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD4 MP Mapping
Posted: Friday, Feb. 1, 2008 06:43 pm
Yes, possible.. I suggest looking at those tutorials again to get the idea of how it all works.. and go over the 'moving things' tutorial in the CoD section.

Start small... make an elevator travel between 2 floors..
then make it so it come to a floor when called there by a trigger..

expand it every time after you've got a stage working. Do not try to make it all in one go, because you'll probably get lost in errors that way.
Share |
Tenshii
General Member
Since: Jan 23, 2008
Posts: 42
Last: Feb 5, 2008
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Saturday, Feb. 2, 2008 04:38 am
What I'm having a problem is with;
trig waittill("trigger");

the waittill won't run the script associated with the lift, til the trigger is pushed. Although it works for one trigger. So far I can use it with only one, any ideas on how to do something along the lines of
"if trigger pushed>then do this" "if not pushed>skip to this line"?
Share |
Bloodlust
General Member
Since: Apr 7, 2004
Posts: 101
Last: Jan 14, 2015
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Saturday, Feb. 2, 2008 05:42 am
just make sure the trigger is big enough for the player to walk into. then everytime a player walks into the trigger, it will start the function you specify. just be sure to set a level variable to keep the elevator from going up and down, up and down if two players are in seperate triggers that's trying to control the elevator. make sure the trigger is a trigger_multiple!


level.elevator_is_moving = undefined;
trigger= getEnt("trigger_name", "targetname");

while(1)
{
players = GetEntArray( "player", "classname" );
for( i = 0; i < players.size; i++ )
{
if( IsAlive( players[ i ] ) && players[ i ] IsTouching( trigger ) )
{
if(level.elevator_is_moving == false)
{
level thread your_elevator_movement_function();
}
}
}
wait 0.5;
}

your_elevator_movement_function()
{
if(level.elevator_is_moving == true)
{
return;
}

//set it to true so it wont try to move the elevator until this function is done. it will just automatically break out of this function until level.elevator_is_moving = false.
level.elevator_is_moving = true;

// do your elevator movement scripting here

//reset level.elevator_is_moving to false so players can move the elevator again
level.elevator_is_moving = false;
}
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»