EffectCutsceneGhost(object, int)
Creates a cutscene ghost effect.
effect EffectCutsceneGhost();
Description
Creates a cutscene ghost effect, this will allow creatures to pathfind through other creatures without bumping into them for the duration of the effect.
This is not used in any spells, it could potentially be dangerous if you specifically have a creature blocking a passage you do not want accessed, so be careful with it.
It will not allow, and nothing will, access through placeables or doors, or line of sight (LOS) through them. This is on purpose with this effect.
The target this effect is applied to must be a creature for it to work. This effect should not be applied instantly, only temporarily or permanently.
Remarks
This is good for NPCs like Ghosts (duh), and Gelatinous Cubes which can pass through creatures (and cubes can paralyze those who stay into them). There is no way to pass through placeables, still, however.
This is a really good function to use for cutscenes, and using it with the VFX_DUR_CUTSEEN_INVSIBILITY and SetCutsceneMode means a PC object who the owner cannot see, and can move seamlessly around a room following any scripted action.
Effect functions are Constructors, which are special methods that help construct effect "objects". You can declare and link effects, and apply them using an ApplyEffectToObject() Command. Once applied, each effect can be got separately via. looping valid effects on the target (GetFirst/NextEffect()). See the Effect tutorial for more details.
Effect Breakdown
There is no available information from GetEffectInteger or similar. Essentially this mimics the DM's "ghosting" which just disables all pathfinding checks for if a creature is blocking the creature it is applied to.
Version
1.62
Example
// Sample code for applying a ghost effect to a target
void main()
{
// This is the Object to apply the effect to.
object oTarget = OBJECT_SELF;
// Create the effect to apply
effect eGhost = EffectCutsceneGhost();
// Create the visual portion of the effect. This is instantly
// applied and not persistent with whether or not we have the
// above effect.
effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS);
// Apply the visual effect to the target
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
// Apply the effect to the object
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, oTarget);
}
See Also
| functions: |
author: Lilac Soul, editor: Jasperre, additional contributor(s): Jasperre