Difference between revisions of "Talk:Cast"

562 bytes added ,  03:06, 21 January 2008
Spell casting from an object
imported>Haama
(Cast without Target doesn't compile)
imported>HawkFest
(Spell casting from an object)
Line 24: Line 24:
:Just tried it - it doesn't compile... wondering about this myself. I want to be able to cast a spell at a door whenever the player presses Activate - guess I need to get the player's heading and position, move a disabled activator to the player's position, move a second activator some 200-300 units in front of the player, and cast the spell?
:Just tried it - it doesn't compile... wondering about this myself. I want to be able to cast a spell at a door whenever the player presses Activate - guess I need to get the player's heading and position, move a disabled activator to the player's position, move a second activator some 200-300 units in front of the player, and cast the spell?
:--[[User:Haama|Haama]] 23:27, 14 November 2007 (EST)
:--[[User:Haama|Haama]] 23:27, 14 November 2007 (EST)
== Spell casting from an object ==
Something that I didn't find in any reference, and that is worth mentioning imho: '''''Cast must be called on a reference'''. Items in inventories aren't references.''
Wich means that any item in your inventory will not execute a cast function within its attached script (MenuMode block or OnEquip), and the script just moves on to the next line of code. This issue was [http://www.bethsoft.com/bgsforums/index.php?showtopic=799581 discussed on the Bethesda forum].
--[[User:HawkFest|HawkFest]] 03:06, 21 January 2008 (EST)
Anonymous user