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

Members Online

»
0 Active | 35 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
Page
Next Page
subscribe
Author Topic: is it possible?? lift Q
-Ghost-
General Member
Since: Jun 21, 2006
Posts: 36
Last: Oct 31, 2007
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Monday, Jul. 23, 2007 11:03 pm
hi all

is it possible to have a 3 story building and have a lift that goes to each floor.

say ur at the bottom floor and want to go to floor 3, say ur at the middle floor and want to go to floor 1. is there away to make a trigger or more than one trigger do what i'm asking.

does this make sense?

Ghost
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Tuesday, Jul. 24, 2007 03:43 am
Yes it's possible to make a lift go to any number of floors, the more floors you have the more complicated the script of course. :)
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Tuesday, Jul. 24, 2007 09:51 am
As Grassy says easily possible.

The easiest way to do this is to have a button for each floor (with say a number on it). Instead of using trigger_use to control the lift, a trigger_damage may be better as the radii for the trigger_use's are likely to overlap. Then you can shoot the buttons to make the lift move :-)

Have a look at the elevator tutorial - it gives a simple example of how to tell where the elevator is (using a level variable).

Before you can move the lift you will need to know:

1. The current position of the lift.
2. The floor you want to go to.

Using this information, you can calculate the number of units to move the lift, so it arrives at the correct destination!

edited on Jul. 24, 2007 05:52 am by Pedro699
Share |
-Ghost-
General Member
Since: Jun 21, 2006
Posts: 36
Last: Oct 31, 2007
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jul. 27, 2007 12:12 am
ok now i know it's possible, how would i go about doing it. i have some scripting knowledge but my brain has froze on this one.

would i need 6 triggers? 1-2 1-3 2-1 2-3 3-2 3-1

thanks

Ghost
Share |
-Ghost-
General Member
Since: Jun 21, 2006
Posts: 36
Last: Oct 31, 2007
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 05:04 am
i guess you can't help me then.
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 11:47 am
Yup, you will need six triggers in three pairs (as 2-1 and 1-2 can have the same targetnames, if you know where the lift is)
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 11:57 am
If you want the availability of calling the elevator to any floor and telling it to either go up or down you will need 6 triggers, 2 on each floor as Pedro said.

Grassy

*EDIT*

Doh! [duh] In fact you will only need 4 triggers.
On the ground floor you can only go up so you need just 1 trigger there. Same for the top floor, you can only go down, so 1 trigger is all thats needed up top.

[biggrin]

edited on Aug. 3, 2007 08:01 am by WHC_Grassy
Share |
-Ghost-
General Member
Since: Jun 21, 2006
Posts: 36
Last: Oct 31, 2007
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 12:16 pm
thanks for the replies....this scripting lark is hurting my head.

only 4 you say hmmm i'll see what i can come up with.

1 top 1 bottom 2 middle "i think" is what you mean, thats a laugh! me thinking.

Ghost

edited on Aug. 3, 2007 08:18 am by -Ghost-
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 02:24 pm
Surely only having one at the top and bottom would mean you could only send the lift the whole way - how would it know to stop in the middle?
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Friday, Aug. 3, 2007 11:05 pm
Yeah good point Pedro, but I was being lazy and assumed that you can only go to the middle floor by default from the top or ground floors. [casanova] And then have to hit one of the triggers at the middle floor again to keep going down or up.

Grassy
Share |
Restricted Access Topic is Locked
Page
Next Page
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

»