CTFSpellBook: Difference between revisions

From SigMod
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 50: Line 50:
*  14 - Overheal (BUMPER-CARS)
*  14 - Overheal (BUMPER-CARS)
*  15 - Bomb Head (BUMPER-CARS)
*  15 - Bomb Head (BUMPER-CARS)
|}
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;"
! 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 some charges by setting m_iSpellCharges to something greater than 0.
It should also be noted that using up all the charges in a spellbook simply sets m_iSpellCharges to 0, the selected spell is not changed. If you need more spells, all you have to do is set m_iSpellCharges.
|}
|}
|-
|-

Latest revision as of 19:01, 10 April 2022

Overview[edit | edit source]

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[edit | edit source]

SendProps[edit | edit source]

CTFSpellBook
Name Type Description
m_iSelectedSpellIndex Integer The spell currently stored.
Values

Spell List

  • -2 - Rolling... (Unknown)
  • -1 - Empty
  • 0 - Fireball
  • 1 - Swarm of Bats
  • 2 - Overheal
  • 3 - Pumpkin MIRV
  • 4 - Blast Jump
  • 5 - Stealth
  • 6 - Shadow Leap
  • 7 - Ball O' Lightning (RARE)
  • 8 - Minify (RARE)
  • 9 - Meteor Shower (RARE)
  • 10 - Summon MONOCULUS! (RARE)
  • 11 - Skeletons Horde (RARE)
  • 12 - Boxing Rocket (BUMPER-CARS)
  • 13 - B.A.S.E Jump (BUMPER-CARS)
  • 14 - Overheal (BUMPER-CARS)
  • 15 - Bomb Head (BUMPER-CARS)
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 some charges by setting m_iSpellCharges to something greater than 0.

It should also be noted that using up all the charges in a spellbook simply sets m_iSpellCharges to 0, the selected spell is not changed. If you need more spells, all you have to do is set m_iSpellCharges.

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.