This article's documentation is for anything that uses the Source engine. Click here for more information.

Tanktrain ai: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(-added class hierarchy)
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{base point|tanktrain_ai}} Train chase AI {{clarify}}.
{{LanguageBar}}
{{CD|CTankTrainAI|file1=1}}
{{this is a|point entity|name=tanktrain_ai}} This is AI to make an associated [[func_tanktrain]] automatically move along its path towards the node closest to a target.
{{bug|The train won't move any faster than 1 unit per second due to coding mistakes.}}


== Keyvalues ==
== Keyvalues ==
{{KV|Train Name|target_destination}}
{{KV|Start Moving Sound|sound}}
{{KV|Engine Loop Sound|sound}}
{{KV|Vehicle Movement Sound|sound}}
{{KV Targetname}}
{{KV Targetname}}
{{KV|Train Name|intn=target|target_destination|The func_tanktrain to move}}
{{KV|Start Moving Sound|intn=startsound|sound|The sound to play when the train starts moving}}
{{KV|Engine Loop Sound|intn=enginesound|sound|The engine sound is looped when it plays}}
{{KV|Vehicle Movement Sound|intn=movementsound|sound|The looping sound to play while the train is moving}}


== Inputs ==
== Inputs ==
{{I Targetname}}
{{I|TargetEntity|Start chasing the entity with this name|param=string|nofgd=1}}
 
== Outputs ==
{{O Targetname}}


[[Category:AI]]
[[Category:AI]]

Latest revision as of 10:46, 28 October 2024

English (en)Translate (Translate)
C++ Class hierarchy
CTankTrainAI
CPointEntity
CBaseEntity
C++ tanktrain.cpp

tanktrain_ai is a point entity available in all Source Source games. This is AI to make an associated func_tanktrain automatically move along its path towards the node closest to a target.

Icon-Bug.pngBug:The train won't move any faster than 1 unit per second due to coding mistakes.  [todo tested in ?]

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Train Name (target) <targetname>
The func_tanktrain to move
Start Moving Sound (startsound) <sound>
The sound to play when the train starts moving
Engine Loop Sound (enginesound) <sound>
The engine sound is looped when it plays
Vehicle Movement Sound (movementsound) <sound>
The looping sound to play while the train is moving

Inputs

TargetEntity <stringRedirectInput/string> !FGD
Start chasing the entity with this name