Ballplayertoucher: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(A entity that allows the pass time ball to touch triggers and players.)
 
(Page formatting made consistent with entity pages from L4D / CSGO; Sentences slightly adjusted due to <code> adding extra whitespaces; Used newer templates)
Line 1: Line 1:
{{tf2 point|_ballplayertoucher}}
{{tf2 point|_ballplayertoucher}} Its a helper entity for the<code>passtime_ball</code>entity, which spawns alongside<code>_ballplayertoucher</code>itself. This entity allows<code>passtime_ball</code>to collide with triggers and players.
 
Interestingly, this entity stores the collision flag<code>SOLID_VPHYSICS</code>when not touching a trigger or player; Conversely it however stores ''two'' collision flags: <code>FSOLID_NOT_SOLID</code>and<code>SOLID_NONE</code>when otherwise.


{{code class|CBallPlayerToucher|tf_passtime_ball.cpp}}
{{code class|CBallPlayerToucher|tf_passtime_ball.cpp}}
==Entity Description==
A helper entity for <code>passtime_ball</code>, which spawns along side <code>_ballplayertoucher</code>. This entity is primarily meant to allow <code>passtime_ball</code> to touch triggers and players.
This entity stores the <code>SOLID_VPHYSICS</code> collision flag when not touching a trigger or player. Conversely this entity stores the <code>FSOLID_NOT_SOLID</code> and <code>SOLID_NONE</code> collision flags when touching a trigger or player.


==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV BaseEntity|base=1}}


==Inputs==
==Inputs==
{{I Targetname}}
{{I BaseEntity|base=1}}


==Outputs==
==Outputs==
{{O Targetname}}
{{IO|OnTouch|Output sent when this entity collides with a player.}}
{{IO|OnTouch|Output sent when this entity collides with a player.}}
{{O BaseEntity}}

Revision as of 12:02, 15 May 2021

Team Fortress 2 _ballplayertoucher is a point entity available in Team Fortress 2 Team Fortress 2. Its a helper entity for thepasstime_ballentity, which spawns alongside_ballplayertoucheritself. This entity allowspasstime_ballto collide with triggers and players.

Interestingly, this entity stores the collision flagSOLID_VPHYSICSwhen not touching a trigger or player; Conversely it however stores two collision flags: FSOLID_NOT_SOLIDandSOLID_NONEwhen otherwise.

C++ In code, it is represented by theCBallPlayerToucherclass, defined in thetf_passtime_ball.cppfile.

Keyvalues

Inputs

Outputs

OnTouch
Output sent when this entity collides with a player.