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

Members Online

»
0 Active | 58 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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: 3 Floor Elevator
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Wednesday, Apr. 29, 2009 06:42 pm
Hi, i've been looking for ages for a elevator that works on 3 floors, i tried complicating a 2 floor didn't work, so if anyone has a 3 floor elevator script can they please help me or at least give me a place to start


thanks, ukdjaj[thumbs_up]
Share |
ChusGMh
General Member
Since: Oct 7, 2008
Posts: 65
Last: Oct 4, 2010
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Wednesday, Apr. 29, 2009 08:28 pm
Ok this is an easy script i've made for you with this script you can go to the floor 0 by the floor 1,2,3 you cant go by the floor 3 to 1 or 2 to 3... that's more hard and i cant explain you now so i give you this script , i remember... its only for make floor 0 to 1 , floor 0 to 2 , or floor 0 to 3 , elevator will go automatic back to floot 0 always ... if u want make you can choose the floor all the time that's more hard and i cant explain u with my low english :P


here is the script

Code:
main()
{
thread elevator();
thread elevator1();
thread elevator2();
}

elevator()
{
elevator=getent("elevator","targetname");
trig=getent("planta1","targetname");
while(1)
{
elevator movex (300,2,1.9,1.9);
elevator waittill ("movedone");
wait(5);
elevator movex (-300,2,1.9,1.9);
elevator waittill ("movedone");
    } 
}
elevator1()
{
elevator1=getent("elevator","targetname");
trig=getent("planta2","targetname");
while(1)
{
elevator1 movex (600,2,1.9,1.9);
elevator1 waittill ("movedone");
wait(5);
elevator1 movex (-600,2,1.9,1.9);
elevator1 waittill ("movedone");
     }
}
elevator2()
{
elevator2=getent("elevator","targetname");
trig=getent("planta3","targetname");
while(1)
{
elevator2 movex(900,2,1.9,1.9);
elevator2 waittill ("movedone");
wait(5);
elevator2 movex(-900,2,1.9,1.9);
elevator2 waittill ("movedone");
}
}
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 01:46 pm
When you have more than 2 floors you'll need at least 2 triggers. The easiest way to have 2 triggers close to each other is to use trigger_damage's and then the player shoots the one they want.

You can either have 2 triggers in each floor with the other 2 floors so it could go straight from floor 1 to floor 3. This is probably the easiest way to do it.

Another alternative which would work with any number of floors would be to have 2 triggers on each floor and have an up and down button where the elevator goes up or down one floor per use.
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 03:46 pm
thanks got it now =D
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Apr. 30, 2009 03:46 pm
thanks got it now =D
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»