spawning creature in Invisible

Moderator: Event DM

Post Reply
Starslayer_D
Master Sage
Posts: 5178
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)
Contact:

spawning creature in Invisible

Post by Starslayer_D » Tue Nov 22, 2005 2:50 am

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.
ashzz: at the very core of the problem is that good characters and organizations can do much more EVIL in the name of good than evil can do evil.
Daerthe: There is only room for so much realism before things start to get silly
User avatar
Rhissaerk Jalesh
Team Member; Retired with Honors
Posts: 1820
Joined: Fri Aug 06, 2004 4:00 am

Post by Rhissaerk Jalesh » Tue Nov 22, 2005 3:13 am

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);
User avatar
Jonezie
Team Member; Retired with Honors
Posts: 3905
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)

Post by Jonezie » Tue Nov 22, 2005 3:31 am

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.
User avatar
Sindol
Team Member; Retired with Honors
Posts: 6479
Joined: Mon Jan 06, 2003 4:23 pm
Location: Nijmegen - Netherlands (GMT+1)
Contact:

Post by Sindol » Tue Nov 22, 2005 7:40 am

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.
So much fun,
yet so little time to enjoy it.
- Sindol
Post Reply