Page 1 of 1

subway

Posted: Wed Jul 16, 2003 4:32 pm
by SlasherZ
i'm making a map w/a subway... is there a way to have it where you can go in the subway car and be transported to the other end of the map?

Posted: Wed Jul 16, 2003 4:38 pm
by m0g
Here's something tltrude made, might give you a hint on how to:

viewtopic.php?t=3881

Posted: Wed Jul 16, 2003 4:39 pm
by SlasherZ
thanks

turns

Posted: Wed Jul 16, 2003 4:49 pm
by tltrude
You can do it much easier if the subway car does not make any turns. If it doesn't, you can use waypoints--like an elevator moving sidways.

There is a teleport trigger too that will just make the player pop to the new location. So, for example, if you had two subway cars, you could make the player jump from one to the other and make it look like he is still in the first car, but at a new station.

Posted: Wed Jul 16, 2003 4:52 pm
by SlasherZ
it is striaght... how do i do waypoints?

Script_object

Posted: Wed Jul 16, 2003 5:02 pm
by tltrude
To use waypoints, you have to make the subway car a script_object. Then place a waypoint in the center of it and one down the track at the destination centerpoint.

Your script would have lines like this:

subway:

$subway_car speed 150 // units per second
$subway_trigger waittill trigger
wait 2
$subway_car moveto $way_2
$subway_car waitmove
wait 10
$subway_car moveto $way_1
$subway_car waitmove
goto subway

end

The above thread is very basic and has no sound or doors.

Posted: Wed Jul 16, 2003 5:18 pm
by SlasherZ
i need doors just basic sliding ones... and how do i make a srcipt object?

Script_object

Posted: Wed Jul 16, 2003 5:34 pm
by tltrude
Highlight all the brushes in the car (except the doors) and hit key N. Then find script_object on the list and double click on it. Next add Key: targetname and Value: subway_car.

subway_prep:

$subway_car speed 150 // units per second
$subdoor_left bind $subway_car
$subdoor_right bind $subway_car
$subway_trigger bind $subway_car
$subdoor_left open
$subdoor_right open
goto subway

subway:

$subway_trigger waittill trigger // trigger_use inside the car
wait 1
$subdoor_left close
$subdoor_right close
$subway_car loopsound lighthouse_run
$subway_car moveto $way_2
$subway_car waitmove
$subway_car loopsound lighthouse_run wait
$subdoor_left open
$subdoor_right open
wait 10
$subdoor_left close
$subdoor_right close
$subway_car loopsound lighthouse_run
$subway_car moveto $way_1
$subway_car waitmove
$subway_car loopsound lighthouse_run wait
$subdoor_left open
$subdoor_right open
goto subway

end


IF this is your first map, you are jumping into the deep end before you learn how to swim!

Posted: Wed Jul 16, 2003 5:39 pm
by SlasherZ
no, i just am clueless about scripting

start the thread

Posted: Wed Jul 16, 2003 5:45 pm
by tltrude
To start the thread you put:

Main:

level waittill prespawn
thread subway_prep

level waittill spawn

end

The doors should be closed in the map. They will be opened in the preperation thread (I updated it).

Posted: Wed Jul 16, 2003 5:46 pm
by SlasherZ
thanks

Posted: Wed Jul 16, 2003 5:58 pm
by SlasherZ
what do i do about the doors and can i have a button to make it go?

-NTLS (Needs to Learn Scripting)

func_door

Posted: Wed Jul 16, 2003 6:12 pm
by tltrude
What? You don't know how to make function doors?

Put origin brushes on the sides and set the angle each will side to. Also set them to "targeted".

Posted: Wed Jul 16, 2003 6:23 pm
by SlasherZ
i do :) , but how do they follow the car? and can i have a button to make the subway car go?

Posted: Wed Jul 16, 2003 6:28 pm
by tltrude
These lines make the doors and trigger go with the car:

$subdoor_left bind $subway_car
$subdoor_right bind $subway_car
$subway_trigger bind $subway_car

And, if you ask me how to make a trigger_use, I QUIT! ha ha.