CTFSpellBook: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 54: | Line 54: | ||
! colspan="1" | Usage | ! colspan="1" | Usage | ||
|- | |- | ||
|It is possible to change this value to change the spell in the spellbook, however there is an important aspect of the functionality of spellbooks to know before using this SendProp. If the spellbook displays the No Spell hud icon, changing the spell through this SendProp will not do anything. This is because m_iSpellCharges is currently 0. For the spell change to take effect, you must also give the spell charges by setting m_iSpellCharges to something greater than 0. | |It is possible to change this value to change the spell in the spellbook, however there is an important aspect of the functionality of spellbooks to know before using this SendProp. If the spellbook displays the No Spell hud icon, changing the spell through this SendProp will not do anything. This is because m_iSpellCharges is currently 0. For the spell change to take effect, you must also give the spell some charges by setting m_iSpellCharges to something greater than 0. | ||
|} | |} | ||
|- | |- |
Revision as of 18:50, 10 April 2022
Overview
The spellbook weapon usable by equipping the spellbook magazine or similar reskins is an instance of this class.
Source location : /game/shared/tf/halloween/tf_weapon_spellbook.h
Linked entity : tf_weapon_spellbook
Class Structure
SendProps
Name | Type | Description | ||||
---|---|---|---|---|---|---|
m_iSelectedSpellIndex | Integer | The spell currently stored.
| ||||
m_iSpellCharges | Integer | The number of charges the spell has. | ||||
m_flTimeNextSpell | Float | A timestamp of when the last spell was cast. | ||||
m_bFiredAttack | Boolean | Stores whether or not our spell has just been cast. |