There are a few ways.
Code: Select all
makeTrigger, timeRepeat, 30, 45, setDistance, 50, 1
makeTrigger, timeRepeat, 31, 45, setDistance, 53, 1
makeTrigger, timeRepeat, 32, 45, setDistance, 56, 1
makeTrigger, timeRepeat, 33, 45, setDistance, 59, 1
makeTrigger, timeRepeat, 34, 45, setDistance, 62, 1
makeTrigger, timeRepeat, 35, 45, setDistance, 65, 1
makeTrigger, timeRepeat, 36, 45, setDistance, 68, 1
makeTrigger, timeRepeat, 37, 45, setDistance, 71, 1
makeTrigger, timeRepeat, 38, 45, setDistance, 74, 1
makeTrigger, timeRepeat, 39, 45, setDistance, 77, 1
makeTrigger, timeRepeat, 40, 45, setDistance, 80, 1
makeTrigger, timeRepeat, 41, 45, setDistance, 83, 1
makeTrigger, timeRepeat, 42, 45, setDistance, 86, 1
makeTrigger, timeRepeat, 43, 45, setDistance, 89, 1
makeTrigger, timeRepeat, 44, 45, setDistance, 92, 1
.
Example 1: On part #1 (green): For 2 seconds, wait at position 200, then move for 1 second from position 50 to 200, and repeat. By "position" I actually mean the distance from the part to its parent.
Example 2: On part #3 (red): For 2 seconds move from position 100 to 200, then for another 2 seconds move back from position 200 to 100, and repeat.
Code: Select all
from zfai import *
moveOneWayDuration = secToFrames(2)
printAll(macro_linearMove("3", moveOneWayDuration, moveOneWayDuration, 100, 200, None, -moveOneWayDuration))
printAll(macro_linearMove("3", moveOneWayDuration, moveOneWayDuration, 200, 100, None, 0))