Author Topic: How to make an object moving on a specified path.  (Read 2330 times)

mRokita

  • Autococker
  • Posts: 598
How to make an object moving on a specified path.
« on: July 12, 2015, 08:04:52 AM »
Hey!
I want to make something like that boat on freedom or that ropeway on beta/twilight2_preview. Can somebody tell me how can I achieve this?

BASEBALLDUDE

  • Autococker
  • Posts: 703
Re: How to make an object moving on a specified path.
« Reply #1 on: July 12, 2015, 03:49:12 PM »
For the entity you want to move:
"classname" "func_train"
"speed" "#"
"target" "targetto"
Put a number in for "#" to control the speed of the object moving. It will take some trial and error to get it right for your map, but 300 is generally a good speed.
You can name "targetto" whatever you want, just make sure that one of the path_corners has a targetname of the same value.
You can place your func_train anywhere on the map depending on how you want your lighting to look; it won't affect in-game location because it will already have a specified path to follow.

To control where the func_train goes, use path_corners. Use as many as necessary.
"classname" "path_corner"
"targetname" "targetfrom"
"target" "targetto"
The value of "target" should be the same as the value of "targetname" for the next path_corner to which you want the func_train to go.
The value of "targetname" should be the same as the value of "target" on the path_corner from which the func_train will come.
The values of "target" and "targetname" can be anything you want as long as they match up with the proper path_corners.

Additional values for path_corners:
"pathtarget" "targetto" triggers an entity with a targetname that matches "targetto" to perform its action when the func_train hits the path_corner
"wait" "#" change # to the number of seconds you want the func_train to stay at the path_corner before moving on to the next. Default is 0.

mRokita

  • Autococker
  • Posts: 598
Re: How to make an object moving on a specified path.
« Reply #2 on: July 13, 2015, 02:12:29 AM »
thx dude ^^
/EDIT: how to make it stop for a while at some point and perform some action like opening a door (beta/twilight2_preview)

BASEBALLDUDE

  • Autococker
  • Posts: 703
Re: How to make an object moving on a specified path.
« Reply #3 on: July 13, 2015, 04:00:37 PM »
thx dude ^^
/EDIT: how to make it stop for a while at some point and perform some action like opening a door (beta/twilight2_preview)

Additional values for path_corners:
"pathtarget" "targetto" triggers an entity with a targetname that matches "targetto" to perform its action when the func_train hits the path_corner
"wait" "#" change # to the number of seconds you want the func_train to stay at the path_corner before moving on to the next. Default is 0.
The door or object being triggered would have "targetname" "targetto"
The path_corner would have "pathtarget" "targetto"
The path_corner would also have "wait" "#"