Hm. That's possible. Actually it's part of a puzzle where I delete and recreate the placeables a few times anyway, so that wouldn't be too much of a stretch to do every time. Though I'd rather not have to.
This is fired from a placeable's OnUsed. Here is the whole script. Incidentally, the other visual effects are displayed perfectly correctly and on the correct placeables only. However, the placeables where no new effect is provided retain transparency instead of it being cleared.
void main()
{
int i = StringToInt(GetSubString(GetTag(OBJECT_SELF), 5, 2)), m;
// Find starting point of row
i -= (i%4>0) ? (i%4)-1 : 3;
for(m=i+4; i<m; i++)
{ object plc = GetObjectByTag("Array"+IntToString(i));
clearfx(plc);
if(GetLocalInt(plc, "act"))
{ ApplyEffectToObject(0, EffectVisualEffect(VFX_IMP_PDK_RALLYING_CRY), plc);
ApplyEffectToObject(2, EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT), plc);
SetLocalInt(plc, "act", FALSE);
}
else
{ SetLocalInt(plc, "act", TRUE);
}
}
}
Modifié par _six, 17 juillet 2011 - 07:07 .