Page 1 of 1
spawning creature in Invisible
Posted: Tue Nov 22, 2005 2:50 am
by Starslayer_D
I know I had seen it browsing at work in this forum.. but.. now at home and trying to apply it, i can't find it for the heck of it. I know it was a vauiable needed to be set on a creature.
Posted: Tue Nov 22, 2005 3:13 am
by Rhissaerk Jalesh
I've managed to do it by adding this to the creatures onspawn script. It should work, but I'm hardly an expert...
effect eInvisibility = EffectInvisibility(INVISIBILITY_TYPE_NORMAL);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eInvisibility, OBJECT_SELF);
Posted: Tue Nov 22, 2005 3:31 am
by Jonezie
Yep, that'll do it. The variable you were thinking of was for stealth, I think - in order to have a creature spawn in stealthed you can set a local int called "X2_L_SPAWN_USE_STEALTH" to 1.
Posted: Tue Nov 22, 2005 7:40 am
by Sindol
Rhissaerk Jalesh wrote:
effect eInvisibility = EffectInvisibility(INVISIBILITY_TYPE_NORMAL);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eInvisibility, OBJECT_SELF);
Replacing the first line with
Code: Select all
effect eInvisibility = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY);
will create an invisibility effect that can not be seen through with any means (like true seeing or see invisibility). Useful if the NPC is just a plot device, and not "really" there (in character).
Apply it as a supernatural effect and it can't be dispelled either.