Proper Timed Repeater Setup?

Matthew57

New member
I want to have a sequance where one thing happens for a second, then the next for a second, then the next. My current setup is skipping over the TimedRepeater and not calling the child task (MoveAway) at all. The Animations before and after work.Sequance.JPG Whats the right way to set this up?
 
What does the Timed Repeater look like? Is that a decorator?

I would approach this by using the repeater task but place a sequence beneath it and then first adding a wait task. This wait task will wait a second before it runs the next sequence of tasks.
 
The above picture shows what the repeater task looks like. It is a decorator.
In the current setup and the one you described, the child tasks of the timed repeater are never called. The Timed repeater gets the green check mark but the children are never touched.
 
Did you create the Timed Repeater? There is likely something within that task that is preventing the children from running.

With the step that I described the child tasks would be called for the count specified in the repeater. You'll need to place the child tasks under a sequence task but it should do exactly what you describe.
 
I discovered what was wrong. The TimedRepeater task resets when the repeater should end in the "OnReset" function. However that function is never called, so the endTime is never changed to Time.time+duration. I didn't want to go into the nuts and bolts of why that wasn't getting called so I put in a statement in the CanExecute function "if(endTime == 0){endTime = TIme.time + duration}" and then I set it back to 0 in the onFinish. Seems to work well enough
 
Top