Abrir menu principal

UESPWiki β

Alterações

Morrowind Mod:Cast

2 585 bytes adicionados, 02h34min de 29 de dezembro de 2013
m
it seems scamps can't cast spells as well and spell in spell list is not necessary
{{Morrowind Modding Functions Trail}}

'''Cast'''
<pre>
Cast, SpellID, TargetID

Where: SpellID = Spell to cast at the target
TargetID = Target for the spell

Type: Magic

Returns: none

Example: Cast, "Cure Common Disease Other", Player
"adairan lalansour"-&gt;Cast, "poisonbloom", "Netch_Giant_UNIQUE"

Scripts: GavisScript
ShrineMeris
</pre>

The calling object casts the given spell onto the target (spells only). A common use for this is to create traps that cast a spell on the player when activated.

<CENTER>********</CENTER>

In the original Morrowind release, a touch spell can be cast by any object but must be directed at a specific REFERENCE to an NPC or creature. Targeted and self spells can only be cast by an NPC or creature.

For example:
<CENTER><pre>FXSpawner-&gt;Cast, "FX_Frost_Sphere", mysterious_temple_NPC00000000</pre></CENTER>
''FXspawner'' is an activator, ''mysterious_temple_NPC'' is an NPC object and ''FX_Frost_Sphere'' is a spell that casts 0 frost damage over an area of 100 for 0 secs. I've found out that each NPC reference has an eight digit number after the object name to differentiate it from any other references (starting from ''00000000''). ''Player'' is a reference and therefore a valid target for Cast as evidenced in the shrine scripts.

It doesn't matter where the caster is, it will still activate the effect on the NPC or creature ref and glow. Only NPCs and certain creatures can cast a targeted spell. Some creatures like rats, scamps can't cast spells. Non-AI objects can cast multiple spells at once at multiple targets or a single target whereas NPCs and creatures will target the last ref targeted in the calling frame. Also, NPCs and creatures have to reset back to where they where when Cast was called before casting again.

Getting a reference to target itself is a perfect substitute in the original Morrowind for Tribunal's ExplodeSpell Command.

<CENTER>********</CENTER>

"Cast" used from a global script on player while he's ready to cast, will directly readied the called spell on player, replacing any already readied spell (same effect as the "Player"->equip function has for a weapon) ; but the readied spell icon won't be changed (until a save/reload).
Example:
<pre>;Let's say that Player gets "SomeSpell" readied; the global script command :
if ( "Player"->GetSpellReadied )
Cast, "AnySpell", "Player"
endif</pre>
will set "AnySpell" ready to be casted by player instead of "SomeSpell", but "SomeSpell" icon will still be shown. (Thanks to Lord Mortim).
Not tested on PNJs.
6 089
edições