Difference between revisions of "Programmable Spell Effects"

Jump to navigation Jump to search
9 bytes removed ,  19:28, 11 September 2006
m
no edit summary
imported>Elder
m
imported>Elder
m
Er? Can't I program my own spells using script effects already?
 
Well of course you can but there are several limitations. For example, what if you wantedwished to do some combination of the following:
 
 
 
; target here is a reference to some actor (or player)
target.AddSpell SilentDm10
 
Notice that using this spell is actually a neater syntax than that for Cast.
 
; target here is a reference to some actor - player is assumed to be the caster
set FIGWildDamageSpell.baseDamage to 10
set FIGWildDamageSpell.wildDamage to 20
set FIGWildDamageSpell.isPlayerHostile to 1
FIGWildDamageSpell.Activate target 1
 
 
 
 
Ironically enough, the thing that Ability spells are not a good idea for is adding permanent effects to targets - including the player! The problem is that abilities get cancelled/re-cast when the target (re)enters the player cell, and any scripted variables are reset. This also applies to abilities on the player when he/she changes cell, although here it is not so bad if you employ all guestquest variables in the ScriptEffectUpdate block.
 
An even less desirable issue is that the ability is added to the base actor object so any spawned generic characters will inherit the same ability. (This is partly why the recipe for silent spells always removes the ability after 1 frame.) This is not an issue if you want your script to affect all base models and may actually be appropriate since the ability will only be in effect when the affected actor(s) are in the same cell as the player.
Anonymous user

Navigation menu