Difference between revisions of "OnSpellCast - ObjectReference"
Jump to navigation
Jump to search
imported>Plplecuyer |
imported>Goggle m (Valid Event for Fallout 4.) |
||
Line 25: | Line 25: | ||
endEvent | endEvent | ||
</source> | </source> | ||
== Notes == | |||
* Carried over from Skyrim, this is still a valid event as many actors in Fallout 4 use spells not obvious to the player. | |||
== See Also == | == See Also == | ||
*[[ObjectReference Script]] | *[[ObjectReference Script]] |
Latest revision as of 00:58, 26 August 2016
Member of: ObjectReference Script
Event called when a spell is cast by the object reference.
Syntax[edit | edit source]
Event OnSpellCast(Form akSpell)
Parameters[edit | edit source]
- akSpell: Spell that was cast. Can be Spell, Enchantment, Potion, or Ingredient.
Examples[edit | edit source]
Event OnSpellCast(Form akSpell)
Spell spellCast = akSpell as Spell
if spellCast && spellCast == FireballSpell
Debug.Trace("We just cast a fireball!")
else
Debug.Trace("We cast something, but we don't know what it is")
endIf
endEvent
Notes[edit | edit source]
- Carried over from Skyrim, this is still a valid event as many actors in Fallout 4 use spells not obvious to the player.