You know how in the defualt user defined death, how it says "do not use for critical code, does not fire reliably all the time"
Well I don't know how to use my critical code any other way. It does work but not all of the time.
The following code is not the whole script, but the segment that is "critical"
if (sSelfTag == "ChampionoftheViod")
{object oPortal = GetObjectByTag("ZEP_PORTAL_Red_VD02");
effect evSummonPortal = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
//effect evCutsceneInvis = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY);
effect eLoop = GetFirstEffect(oPortal);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,evSummonPortal,GetLocation(oPortal));
while (GetIsEffectValid(eLoop))
{
if (GetEffectType(eLoop)==EFFECT_TYPE_VISUALEFFECT)
DelayCommand(1.0f,RemoveEffect(oPortal,eLoop));
eLoop = GetNextEffect(oPortal);
}
}
Bear in mind I'm going for a generic approach when each time it fires it checks the tag of the creature calling the script, this I can cut down on scripts, and also oPortal was given cutscene invisablity in the on area enter script, this way didn't have to creat it from an existing custom blueprint which cuts down on blueprints as well.
Anyway my question is how do stuff like spawn a portal when the boss dies reliably?
Modifié par Q.dot, 28 janvier 2011 - 10:42 .