One of the unfortunate things with using triggers to apply cover and concealment effects, by whatever mechanic, is that one must be careful to *not* allow melee combat in the same area, otherwise there is an easily exploitable ploy to navigate the fight so that one combatant is standing in the trigger (next to the parapet, for example) and benefiting from the cover effects, while the other is not.
Failed.Bard:
...As long as you know what object is applying the effect, it's easy to remove just that one as well. If you're doing it in a triggers' OnEnter/OnExit, then the trigger will be the effect creator. Just remove effects created only by OBJECT_SELF in the OnExit you'll be fine.
actually, I hadn't thought of that before. I suppose I could set the script to check for the entering objects AC bonus, take that and then add the appropriate cover bonus to it, and reapply it as *the* AC bonus, then, I could strip off the effect applied by object when they leave the trigger.
My current on exit script isn't that sophisticated though:
void main()
{
object oPC=GetEnteringObject();
if (!GetIsPC(oPC)) return;
//Remove concealment from the PC
effect eLoop=GetFirstEffect(oPC);
while (GetIsEffectValid(eLoop))
{
if (GetEffectType(eLoop)==EFFECT_TYPE_CONCEALMENT)
RemoveEffect(oPC, eLoop);
eLoop=GetNextEffect(oPC);
}
}