Resource icon
  • Hey you! Yes, you! Add images to your downloads, it's free! Use the orange "Manage Download Image" button in the top right.

trigger_timer_movable 0.9.2

Script that synchronises capture rate and moving object's speed

Somewhat lightweight script that manages the object movement in relation to the capture progress of spectified capture area's point

Setup:
1) Setup any supported movable object how you'd normally do
(Note: make sure there are nothing that changes the speed and moving direction of the entity. It is done automatically by the script, which may break if interfered)
2) Setup team_control_point and trigger_capture_area like you'd normally do
3) Create logic_script entity
4) Add this script to logic_script's script list
5) Put your movable object's name in EntityGroup[0] and your trigger_capture_area's name in EntityGroup[1]


Public API:
1) SetDoorDirectionForTeam( enum ETFTeam team, enum Direction direction ) -> null
By default, all doors, tracktrains and movelinears open or go forward when being capped no matter what team captures it. This can be changed via this method
params:
ETFTeam team - team to set the move direction for. See https://developer.valvesoftware.com/wiki/List_of_TF2_Script_Functions/Constants#ETFTeam
Direction direction - direction to move in. Possible values are: DIR_NONE (0), DIR_FORWARD (1), DIR_BACKWARD (-1)
Usage example:
1676537950688.png

(Tells the platform to move back (-1) whenever red team (2) captures it or owns it while the cap progress decays)

Script currently supports following entity types as movable objects:
- func_door
- func_movelinear
- func_tracktrain

If you have any suggestion, feel free to post it here
If you have found a bug or want to add something to the script, open an issue or a pull request respectively on this script's GitHub page:

Showcase:
View: https://www.youtube.com/watch?v=d9WZ6JM5dpk
License
Free to use and modify. Credit is appreciated but not required.
Author
TH3 D34DL3$$
Downloads
191
Views
1,027
First release
Last update
Category
VScript

More downloads from TH3 D34DL3$$

Latest updates

  1. Fixed some typos

    Fixed some typos (it only took me a week. Yay!)
  2. Patch

    - Fixed Door wrapper's GetDistance trying to use constructor parameter instead of it's member