Creating a moving platform: Difference between revisions
Jump to navigation
Jump to search
MrThompson (talk | contribs) (fixed text size) |
(Core of tut) |
||
Line 2: | Line 2: | ||
== Introduction == | == Introduction == | ||
[[Image: | [[Image:moving_platform_01.jpg|right|Width:64]] | ||
In this tutorial we will be creating a moving platform. | In this tutorial we will be creating a moving platform. | ||
An example map | An example map will be available for download [http://myfreefilehosting.com/f/c28a01c6bb_0.1MB here]. | ||
== Creating and setting basic model == | == Creating and setting basic model == | ||
Line 15: | Line 15: | ||
== Creating function == | == Creating function == | ||
Create brush with dimensions of chosen platform. It’s not | Create brush with dimensions of chosen platform. It’s not necessary, but it will surely work. | ||
Tie it to <code>func_door</code> entity by | Tie it to <code>func_door</code> entity by pressing [ctrl + t]. Set it’s variables as follow: | ||
[[Image:moving_platform_system.jpg|right|Height:64|Width:64]] | |||
<!-- | |||
Somebody pls make that img smaller | |||
--> | |||
::{| | ::{| | ||
! Property Name || Value | ! Property Name || Value | ||
|- | |- | ||
| Change angles || this is up to you, I’m using: <code | | Change angles || this is up to you, I’m using: <code>never (fixed orientation)</code> | ||
|- | |- | ||
| Change velocity || too, it’s your choise, but: <code | | Change velocity || too, it’s your choise, but: <code>ease in/ease out</code> | ||
|- | |- | ||
| First stop target || <code>P1_S1_M</code> | | First stop target || <code>P1_S1_M</code> | ||
|- | |- | ||
| Initial speed || <code>100</code> | | Initial speed || <code>100</code> | ||
|- | |- | ||
| Initial speed || <code>100</code> | | Initial speed || <code>100</code> | ||
|- | |||
| Name || platform_func | |||
|- | |||
| | |||
|} | |||
And, you may set sounds: | |||
::{| | |||
! Property Name || Value | |||
|- | |||
| Start sound || <code>Doors.Move12</code> | |||
|- | |||
| Stop sound || <code>Doors.FullClose12</code> | |||
|- | |||
| | |||
|} | |||
== 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 || <code>P1_S1_M</code> | |||
|- | |||
| New train speed || <code>30</code> | |||
|- | |||
| Next stop target || <code>P1_S1_O</code> | |||
|- | |||
| | |||
|} | |||
Now create another one: | |||
::{| | |||
! Property Name || Value | |||
|- | |||
| Name || <code>P1_S1_O</code> | |||
|- | |||
| New train speed || <code>200</code> | |||
|- | |||
| Next stop target || <code>P1_S2_I</code> | |||
|- | |||
| | |||
|} | |||
P1_S2_I: | |||
::{| | |||
! Property Name || Value | |||
|- | |||
| Name || <code>P1_S2_I</code> | |||
|- | |||
| New train speed || <code>30</code> | |||
|- | |||
| Next stop target || <code>P1_S2_M</code> | |||
|- | |||
| | |||
|} | |||
P1_S2_M: | |||
::{| | |||
! Property Name || Value | |||
|- | |||
| Name || <code>P1_S2_M</code> | |||
|- | |||
| New train speed || <code>30</code> | |||
|- | |||
| Next stop target || <code>P1_S2_O</code> | |||
|- | |||
| | |||
|} | |||
P1_S2_O: | |||
::{| | |||
! Property Name || Value | |||
|- | |- | ||
| Name || | | Name || <code>P1_S2_O</code> | ||
|- | |||
| New train speed || <code>200</code> | |||
|- | |- | ||
| | | Next stop target || <code>P1_S1_I</code> | ||
|- | |- | ||
| | | | ||
|} | |} |
Revision as of 01:51, 4 February 2008

This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.
The person who added this notice will be listed in its edit history should you wish to contact them.
It will probably take more than 24 hours so if you will be faster, let me know. I will not work on this page more than week. Thx
Introduction
In this tutorial we will be creating a moving platform.
An example map will be 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 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
Initial speed 100
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