Difference between revisions of "Cast"
Jump to navigation
Jump to search
imported>Mmmpld (Does work on the player, removed note saying it doesn't) |
imported>Scruggs (Activators can work as targets; clarify DW's note re: player, issue with actors casting Target spells.) |
||
Line 4: | Line 4: | ||
Cast ShrineAkatoshSpeedMagicka Player | Cast ShrineAkatoshSpeedMagicka Player | ||
Calling object casts spell | Calling object casts the specified spell at the target. | ||
The behavior of this function depends on the range of the spell and the types of the calling object and target reference: | |||
==Notes== | ==Notes== | ||
*If called by an actor, the actor will | *This function can be used to force the player to cast a spell on himself, but cannot force him to cast Touch or Target range spells at other actors or objects. | ||
*If called by an actor, the actor will play his normal spellcasting animations while casting the spell. If the actor is a creature with no spellcasting animation, the function will not work. When called on anything other than an actor, the calling object does not animate. | |||
*Only | *Only certain types of objects appear to serve as valid targets. Actors and activators work, but when some other object types, such as Items, are supplied for the Target parameter, the spell projectile will travel down the negative ''y''-axis rather than in the direction of the target. | ||
*This function is unreliable when used to force an actor to cast a Target-range spell on a target which is not within Touch-range. Often the actor will attempt to walk into touch-range of the target and then cast the spell, but more frequently he will simply ignore the function. | |||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category: Magic Functions]] | [[Category: Magic Functions]] | ||
[[Category:Actor Functions]] | [[Category:Actor Functions]] |
Revision as of 14:35, 20 May 2007
Syntax:
[[ActorID|ActivatorID.]Cast SpellID [TargetRefID]
Example:
Cast ShrineAkatoshSpeedMagicka Player
Calling object casts the specified spell at the target. The behavior of this function depends on the range of the spell and the types of the calling object and target reference:
Notes
- This function can be used to force the player to cast a spell on himself, but cannot force him to cast Touch or Target range spells at other actors or objects.
- If called by an actor, the actor will play his normal spellcasting animations while casting the spell. If the actor is a creature with no spellcasting animation, the function will not work. When called on anything other than an actor, the calling object does not animate.
- Only certain types of objects appear to serve as valid targets. Actors and activators work, but when some other object types, such as Items, are supplied for the Target parameter, the spell projectile will travel down the negative y-axis rather than in the direction of the target.
- This function is unreliable when used to force an actor to cast a Target-range spell on a target which is not within Touch-range. Often the actor will attempt to walk into touch-range of the target and then cast the spell, but more frequently he will simply ignore the function.