This article relates to the game "Team Fortress 2". Click here for more information.

Tf spell pickup: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (minor formatting fix)
(-added class hierarchy)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{tf2 point|tf_spell_pickup}}
{{TF2 topicon}}
{{stub}}
{{LanguageBar}}
{{CD|CSpellPickup|file1=1}}
{{this is a|model entity|game=Team Fortress 2|name=tf_spell_pickup}}


==Entity description==
A spellbook pickup used in Helltower and dynamically dropped by killed players in [[tf_logic_holiday|any Halloween map that has spells enabled]].
A spellbook pickup used in Helltower and dynamically dropped by killed players in [[tf_logic_holiday|any Halloween map that has spells enabled]].


==Keyvalues==
==Keyvalues==
{{KV Targetname}}
{{KV Targetname}}
{{KV|Spell Tier|intn=tier|integer choices|Tier of spells that would be randomly assigned to the player
:* 0 : Common
:* 1 : Rare
}}
{{KV TFTeam}}
{{KV TFTeam}}
{{KV EnableDisable}}
{{KV EnableDisable}}
{{KV Angles}}
{{KV Angles}}
{{KV DistanceFade}}
{{KV DistanceFade}}
{{ScrollBox|title=Powerup_model|{{KV|Model|string|Changes the in-game model to something other than the default model.}}}}
{{ScrollBox|title=AutoMaterialize|{{KV|Auto-Materialize|bool|The pickup should automatically materialize after being picked up.}}}}
{{ScrollBox|title=Tier|{{KV|Spell Tier|choices|Tier of spells that would be randomly assigned to the player}}
:* 0 : Common
:* 1 : Rare}}


==Inputs==
{{minititle|Powerup_model}}
{{I Targetname}}
{{KV|Model|string|Changes the in-game model to something other than the default model.}}
{{minititle|AutoMaterialize}}
{{KV|Auto-Materialize|bool|The pickup should automatically materialize after being picked up.}}
 
== Inputs ==
{{I EnableDisable}}
{{I EnableDisable}}
; <code>Toggle</code>
{{I|Toggle|Toggles the enabled/disabled status of the entity.}}
: Toggles the enabled/disabled status of the entity.


==Outputs==
==Outputs==
{{O Targetname}}
{{O|OnPlayerTouch|Sent when the entity is picked up by a player.}}
; <code>OnPlayerTouch</code>
: Sent when the entity is picked up by a player.
 
[[Category:Team Fortress 2 Entities]]

Latest revision as of 16:24, 5 June 2025

English (en)Translate (Translate)
C++ Class hierarchy
CSpellPickup
CTFPowerup
CItem
CBaseAnimating
CBaseEntity
C++ tf_spell_pickup.cpp

tf_spell_pickup is a model entity available in Team Fortress 2 Team Fortress 2.

A spellbook pickup used in Helltower and dynamically dropped by killed players in any Halloween map that has spells enabled.

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

Spell Tier (tier) <integer choices>
Tier of spells that would be randomly assigned to the player
  • 0 : Common
  • 1 : Rare
TeamNum:
Initial Team (TeamNum) <choices>
Which Team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator/Halloween Souls Team Fortress 2
  • 2: RED Team Fortress 2
  • 3: BLU/Robots Team Fortress 2
  • 5: Halloween Bosses (only in Team Fortress 2) !FGD


Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

BaseFadeProp:

Start Fade Dist (fademindist) <float>
Distance at which the entity starts to fade.
End Fade Dist (fademaxdist) <float>
Max fade distance at which the entity is visible.
  • If start fade is <0, the entity will disappear instantly when end fade is hit.
  • If end fade is <0, the entity won't disappear at all. (This is the default behavior.)
The values will scale appropriately if the entity is in a 3D Skybox.
Fade Scale (fadescale) <float>
If you specify so in worldspawn, or if the engine is running below DirectX 8 (DX7 in Source 2006), props will fade out even if the fade distances above aren't specified. This value gives you some control over when this happens: numbers smaller than 1 cause the prop to fade out at further distances, while those greater than 1 cause it to fade out at closer distances. Using 0 turns off the forced fade altogether. See also the QC command $noforcedfade.

Powerup_model:

Model ([todo internal name (i)]) <string>
Changes the in-game model to something other than the default model.

AutoMaterialize:

Auto-Materialize ([todo internal name (i)]) <boolean>
The pickup should automatically materialize after being picked up.

Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.
Toggle
Toggles the enabled/disabled status of the entity.

Outputs

OnPlayerTouch
Sent when the entity is picked up by a player.