Here's my code, the line 'lit' appears on screen at the appropriate time, but the ballista does nothing.
Scriptname PCKP_ActivateOnHit extends ObjectReference MagicEffect Property myMEff autobool doOnce = falseEvent OnMagicEffectApply(ObjectReference Caster, MagicEffect MEff) ;Debug.Notification("applied") if MEff==myMEff && doOnce == false ;Debug.Notification("lit") GetLinkedRef().Activate(Game.GetPlayer()) gotostate("Active") doOnce = true endIfendEventauto State InactiveendStateState ActiveendState