Rail Platform

From Valve Developer Community
Jump to: navigation, search
English (en)Русский (ru)
... Icon-Important.png
the finished assembly

Rail platforms are used in Portal 2 instead of Portal's "unstationary Scaffold". They Consist of one dynamic prop, a couple of static ones, two path_tracks one Func_tracktrain and a func_brush.

Creating the Moving Platform

Step 1: Models

The platform consists of a prop_dynamic.

Property Value
Name laserplatform_model
World Model models/anim_wp/arm_interior_192/arm_interior_192.mdl
Default Animation laserplatform

And for the rails, place some prop_statics with the Model: "models/anim_wp/arm_interior_192/motionplatform_rail_128.mdl"

Step 2: The train

First, Create two Path_tracks: Name them laserplatform_path1 and laserplatform_path2. place them along the rail models you placed in the previous step. Now, create a nodraw brush at the bottom of your platform, press CTRL + T to tie it to an entity, make it a func_tracktrain and name it "laserplatform_train". Move its origin to your first path_track. give it these values:

Property Value
first stop target laserplatform_path1
Max Speed 75
Change Angles Never (Fixed orientation)

At last, change the 'parent' Value of your prop_dynamic to your train.

Step 3: Making the platform Collide

The model we used previously has no collision mesh, therefore we have to create a func_brush with the 'Invisible' texture applied and 'solidity' set to 'Always Solid'. Change its parent too.

Step 4: making the platform start and stop

To start or stop the platform, Create a trigger of some kind (I used a prop_floor_button, placed ontop of the platform) and give it these outputs:

My Output Named Target Entity Input Value
<Insert output here> laserplatform_train setspeed 75
<Insert output here> laserplatform_train stop -