OK, so a lot of people (myself included)
seem to have had problems on applying spell effects to monsters when
they are summoned by doing something like opening a chest (I don't think
this applies to monsters who join the part, but hostile monsters).
Anyway, I've come up with a solution - it's not really what I wanted,
but it's pretty good - and I figure if I use this effect to summon 15 or
so Umber Hulks, my first level characters aren't really going to notice
the slight imperfection.
Anyway, it works like this
Firstly, you have to create an invisible object, then set its tag to
something like INVIS_001. Now, and this is important, go to the
invisible objects properties and make sure your UNCHECK the static
checkbox, and don't check any of the others.
Now use this script with a chest OnOpen event (or something like that):
NWScript: void main()
{
object oCreature = GetLastOpenedBy();
object oLoc = GetObjectByTag("INVIS_001");
if (GetIsObjectValid(oCreature) == TRUE && GetIsPC(oCreature) == TRUE)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SMOKE_PUFF), oLoc);
ActionWait(0.5);
string sCreature = "NW_MUMMY";
object oMonster = CreateObject(OBJECT_TYPE_CREATURE, sCreature, GetLocation(oLoc), FALSE);
}
}
That's it, give it a try.
|