def M_START_main(ctrlr): if state.get_property(ctrlr, 'num_sk') <= 3: state.set_sequence(ctrlr, 'PUSH_SAW', 'FORWARD', 'PULL_SAW', 'REACHED', 'BACKWARD', 'ROT_SHAFT', 'M_START', ) state.next_state(ctrlr) else: state.goto_master(ctrlr, 'M_WAIT')
def ROTATING_main(ctrlr): if state.stateframe(ctrlr) > state.get_property(ctrlr, 'angle'): ctrlr.deactivate(ctrlr.actuators['rotation']) ctrlr.activate(ctrlr.actuators['Shaft_ROTATED']) print(ctrlr.owner.localOrientation.to_euler('XYZ')) state.next_state(ctrlr)