Yep, but if you have the item be the creator of the effect, you can use the item to remove all effects created by the item (if (GetEffectCreator(eEffect) == oItem) RemoveEffect(eEffect);
). It’s a convenient pre-EE-effect-tagging method to make something apply and remove a set of effects.
The alternative to using AssignCommand is to make the inventory item apply the effects via a separate script using ExecuteScript. I’ve switched the restraints scripts to that method, to try and see if it works without the AssignCommand
s, but it’s made no difference.
There’s a bug report for the Dexterity decrease thing over here.
I’ve found something curious. Following up on Proleric’s lead, I put this in an area OnEnter script:
void DecreaseStats(object oPC)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectAbilityDecrease(ABILITY_DEXTERITY, 5)), oPC, 5.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectAbilityDecrease(ABILITY_STRENGTH, 5)), oPC, 5.0);
DelayCommand(7.0, DecreaseStats(oPC));
}
… and called it on the PC at a 3 second delay.
The very first time the effects are applied, only the Strength decrease shows up. Every time after that, it’s both of them. Same thing when it’s in OnClientEnter - but inside an item’s OnActivateItem script, it doesn’t happen.
Putting the ability decreases directly into void main in the area’s OnEnter script (no delay) makes both of them apply. See the absence of a delay in @Proleric’s version, too. 
If the ApplyEffectToObjects that are directly in void main are delayed via DelayCommand, the first Dexterity decrease doesn’t show up anymore again.
Can you guys check whether delaying makes a difference for you? Also - why on earth are the roles reversed and the Dexterity decrease shows up while the Strength decrease doesn’t, in @squattingmonk’s case?
what is happening here
