CastImmediate
From GECK
A function added by the JIP NVSE Plugin.
Contents
Description
An alternate version of the vanilla CastImmediateOnSelf. Instantly invokes the specified Game Effect (Actor Effect, Object Effect or Ingestible) on the calling actor reference.
If the second (optional) argument casterRef is not omitted, the effects being applied on the calling reference will be registered as if they were inflicted by casterRef.
- If any of the Effect Items of the effect are considered hostile, this will count as an assault.
- If the effect causes the death of the calling actor, and the caster is the player character, XP will be gained for the kill.
Note: For the above to work properly, all the "hostile" Effect Items must have their Range set to Touch.
- If the target is not a Ghost, the spell's type is NOT Disease, Ability or Addiction, and a casterRef is specified, calling this function can trigger OnHit events for each applicable Effect Item.
- If the target reference is not currently loaded, does nothing.
Syntax
reference.CastImmediate gameEffect:ref casterRef:ref
Example
SunnyRef.CastImmediate CazadorPoison player ;* Only if "hostile" Effect Items have "Touch" range! ;* SunnyRef will now be affected by the CazadorPoison effect, and will turn hostile against the player.
player.CastImmediate FlamerCritEffect ;* Only if "hostile" Effect Items have "Self" range! ;* The player will suffer the (mostly visual) effects of FlamerCritEffect.