void main() { int nDoOnce = GetLocalInt(OBJECT_SELF, "DoOnce"); if (!nDoOnce && GetLocalInt(OBJECT_SELF, "BeamSetToOn") == TRUE) { ExecuteScript("ud_beamtarget", OBJECT_SELF); SetLocalInt(OBJECT_SELF, "DoOnce", TRUE); } }