Creating a moving platform: Difference between revisions
m (Link addes + some grammar) |
m (On line has been there two times.) |
||
Line 32: | Line 32: | ||
| Initial speed || <code>100</code> | | Initial speed || <code>100</code> | ||
|- | |- | ||
| | | Max speed || <code>10 000</code> | ||
|- | |- | ||
| Name || platform_func | | Name || platform_func |
Revision as of 02:16, 4 February 2008
Introduction
In this tutorial we will be creating a moving platform.
An example map is available for download here.
Creating and setting basic model
You will need one from these models
- This one is bigger:
models/props/light_rail_platform.mdl
. - This one is smaller
models/props/light_rail_platform_02.mdl
. - After you make decided witch one is better for you, name it
platform_model
. - Set its parent to
platform_func
, we will create it now.
Creating a function
Create brush with dimensions of chosen platform. It’s not necessary, but it will surely work.
Tie it to func_door
entity by pressing [ctrl + t]. Set it’s variables as follow:
Property Name Value Change angles this is up to you, I’m using: never (fixed orientation)
Change velocity too, it’s your choise, but: ease in/ease out
First stop target P1_S1_M
Initial speed 100
Max speed 10 000
Name platform_func
And, you may set sounds:
Property Name Value Start sound Doors.Move12
Stop sound Doors.FullClose12
Track
Our platform is using path_track to move, so we have to create some. You can see architecture we we will use. Create path_track entity with this setting:
Property Name Value Name P1_S1_M
New train speed 30
Next stop target P1_S1_O
Now create another one:
Property Name Value Name P1_S1_O
New train speed 200
Next stop target P1_S2_I
P1_S2_I:
Property Name Value Name P1_S2_I
New train speed 30
Next stop target P1_S2_M
P1_S2_M:
Property Name Value Name P1_S2_M
New train speed 30
Next stop target P1_S2_O
P1_S2_O:
Property Name Value Name P1_S2_O
New train speed 200
Next stop target P1_S1_I
Move them as you need and check, if they are linked by an yellow line.
Make it nice
Now you have working platform, but we will add few models. That oval-like object is mostly on wall, so it's easy to add it to your map. Second model looks better, you may even add that stand under it. Just align top of P1_Sx_M to top of that model.