Here's an example with doing slowdown with the status effects:
function addFreeze(obj:GameObject,tag:String) {
obj.addStatusEffect(StatusEffectType.ANIMATION_FREEZE,0, {tag: tag});
obj.addStatusEffect(StatusEffectType.PHYSICS_FREEZE,0, {tag: tag});
}
function removeFreeze(obj:GameObject,tag:String) {
removeStatusEffectsByTag(obj,StatusEffectType.ANIMATION_FREEZE,tag);
removeStatusEffectsByTag(obj,StatusEffectType.PHYSICS_FREEZE,tag); 