Difference between revisions of "AddSpell"

Jump to navigation Jump to search
562 bytes removed ,  19:00, 31 May 2008
Consolidate no spam info.
imported>Quetzilla
imported>Wrye
(Consolidate no spam info.)
Line 30: Line 30:
*Be careful when using this function on non-unique actors. Adding an ability or spell to an actor adds it to the base object, so any references that are later spawned from that base object will also have the spell.
*Be careful when using this function on non-unique actors. Adding an ability or spell to an actor adds it to the base object, so any references that are later spawned from that base object will also have the spell.


*Using AddSpell to add a spell to the player's repertoire will give a message informing the player of this. In many situations, this is very annoying, but you can use a pair of blank [[Message]] calls to prevent it from happening, like so:
* See [[Message Spam]] to avoid unwanted "Spell Added" messages.
<pre>Message " "
Message " "
player.AddSpell "spell ID"</pre>
*This seems to shortcircuit the message display and will prevent any other messages from being queued or displayed for a couple of seconds, so please use it only if you are sure no other messages will be disrupted, or you would create a lot of message spam otherwise.
*OBSE 0015 provides [[AddSpellNS]] which works exactly the same as AddSpell but without displaying any messages.


*Like most functions, this one is a little different when used as a console command. When used as a console command the SpellID must be specified as a [[FormID]].
*Like most functions, this one is a little different when used as a console command. When used as a console command the SpellID must be specified as a [[FormID]].
*Note that many spell effects don't work as abilities, including Feather, Burden, and Disintegrate spells, as well as any spell that causes the target to react to the caster like Turn Undead, Charm, and Demoralize.
*Note that many spell effects don't work as abilities, including Feather, Burden, and Disintegrate spells, as well as any spell that causes the target to react to the caster like Turn Undead, Charm, and Demoralize.


==See Also==
==See Also==
*[[AddSpellNS]]
*[[AddSpellNS]] - Spamless version of command (OBSE 15)
*[[RemoveSpell]]
*[[RemoveSpell]]
*[[Preventing messages]]
*[[Message Spam]] - Avoid message spam.


==Reference==
==Reference==
Anonymous user

Navigation menu