Page 1 of 1

Adding call triggers to Erick's 2-floor elevator script.

Posted: Sat Nov 24, 2007 3:34 am
by StarGeneral
All right, heres the deal. I need to add call triggers into my map on the top and bottom floors. I wont be using switches though, i will only use triggers placed in front of some static models. I need to what and where to add lines of code to make the call triggers work they are named

bottom_call

top_call

simply tell me where and what I need to add to my script, I followed erick's two floor elevator tut.

no script elevator

Posted: Sat Nov 24, 2007 5:58 am
by tltrude
It would be easier to just use an elevator that does not need anything in the script.

http://gronnevik.se/rjukan/index.php?n= ... veElevator

The link to my door2 map is broken in the totorial, but you can get it by clicking on my signature logo below.

Image

Posted: Sun Nov 25, 2007 9:56 pm
by erick
For call triggers on a 2 floor setup like yours just add your static models and trigger_use's on the top and bottom floor. Then give them setthreads of top_floor or bottom_floor depending on the floor.

Then add this to your code:

Code: Select all

top_floor:
if (level.elepos==1) //put in your level variable
{
end
}
else
{
$elevator_cab moveto $topfloor // use the name of the elevator cab in here and the name of your top floor waypoint
$elevator_cab loopsound lighthouse_run
$elevator_cab waitmove
$elevator_cab stoploopsound
level.elepos++
goto elevator_standby //this is the heading of the line for when the elevator is not in motion
end

bottom_floor:
if (level.elepos==0)
{
end
}
else
{
$elevator_cab moveto $bottomfloor // use the name of the elevator cab in here and the name of your top floor waypoint
$elevator_cab loopsound lighthouse_run
$elevator_cab waitmove
$elevator_cab stoploopsound
level.elepos--
goto elevator_standby
end
This should work...if you followed the tutorial