The title says it all. Just finishing my module for my granddaughter (8yrs old) and have come to the last scene where it is necessary to destroy old gran and spawn in new one. (Don’t ask - we all have to make sacrifices) !
The destroying goes great - sorry, gran - but the clone fails to spawn in. I feel somehow the original grandma isn’t happy with me . . .
From SG, the code on a trigger is
void main()
{
object oTarget;
object oSpawn;
effect eVFX;
// Get the creature who triggered this event.
object oPC = GetEnteringObject();
// Only fire for (real) PCs.
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
return;
// Only fire once.
if ( GetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF)) )
return;
SetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
// Spawn "grandma_clone".
eVFX = EffectVisualEffect(VFX_FNF_SMOKE_PUFF);
oTarget = GetWaypointByTag("wp_grandmaspawn");
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "grandma_clone", GetLocation(oTarget));
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSpawn));
}
Both tag and ResRef are “grandma_clone” and I’ve checked the WP tag is “wp_grandmaspawn”. Original grandma tag and ResRef were “grandma” - not that that should matter.
And, yes, I know the puff of smoke is gratuitous but the wee lass is only 8 !
Any help would be appreciated.