MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
Sparks [Forum]
extremz0r [Tutor]
Welshy [Today]
Slayer(ACC) [Forum]
winkledony [Tutor]
3dcircle [Downl]
Arkadian [Forum]
tourist.Tam [Forum]
DieMAN [Tutor]

9 Members and 14 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Friday, Aug. 29th
MODSonair Episode 142
Wednesday, Aug. 27th
Details revealed
Sunday, Aug. 24th
Mappers Guild AKA Help Desk
Sunday, Aug. 24th
MODSonair 142 LIVE
Friday, Aug. 22nd
MODSonair Episode 141
Latest Poll
Want a MODSonline Wiki for various games?
I think a Wiki would be a great addition to MODSonline. 78.13%
I could see a benefit of a Wiki. 3.65%
I think it would take away from the community. 5.21%
Wiki sites are never good. 3.13%
Wiki... isn't that Buck Roger's robot slave? 9.9%
Read More...
13 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
Breakables eye candy ?
CoD 4 Level Desi.. Posts: (5) Views: (60) by The_Caretaker
Please Help!
CoD 4 Level Desi.. Posts: (5) Views: (54) by The_Caretaker
Mappers Guild AKA Help Desk
CoD 4 Level Desi.. Posts: (10) Views: (184) by GRIM-G-RC
Change AI
CoD 4 Single Pla.. Posts: (1) Views: (16) by starkk
Art of War Central Half-Life 2 Mods for Dummies
Typhoon Servers
Forums
MODSonline.com 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, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, batistablr
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: elevator works but...
liltc64
General Member
Since: Feb 12, 2007
Posts: 73
Last: Aug 11, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Feb. 22, 2008 10:47 pm
hey i finaly got my elevator to work it gose up but dosnt go down i use this script
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 = 588;
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;
}

any ideas how to make it go down when i get up there???
liltc64
General Member
Since: Feb 12, 2007
Posts: 73
Last: Aug 11, 2008
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Saturday, Feb. 23, 2008 10:21 am
anyone???[read]
Garthogg
General Member
Since: Jan 29, 2008
Posts: 16
Last: Jun 12, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Wednesday, Apr. 16, 2008 02:27 am
Hmm...,

Its to dificulti, try to use simple "moves", and type simple "waits" to it going to "realistic"

And u could to find a turtoial for this:P
[jumping][sniper]
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Intergi
Partners
The Firing Box
Battle for Europe COD2
modbase.be
XoXide
Call of Duty Headquarters
Frag Universe
Ask About
Advertising
Friends
CoD 4 Base
Great Gamer
ModTheater
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 142
MODSonair Episode 141
MODSonair Episode 140
MODSonair Episode 139
MODSonair Episode 138
Next Show
The next MODSonair show will air LIVE on:
08/31/2008 11:00 EDT

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware