Logic Brick Question

pizzlepole

New member
Messages
21
Reactions
7
Points
3
I'm looking to build a scene where a timeline animation is on loop, and after X amount of loops, I can trigger a value increase. I tried using MacGruber's Counter and Timer, but I wasn't able to figure it out. Any suggestions out there?
 
Counter brick sounds like what you need. With every loop of the animation you trigger the Counter brick to count up. Once the Counter reaches its Count, have it trigger your value increase thing.

Edit: If "value increase" means you want to increase multiple times, not just set a different value...that is also possible. Use a second Counter that is triggered from the first one. For an example, check the Counter example that comes with the LogicBricks Demo scenes. There is a Counter brick used to drive a Slider value.
 
Last edited:
A small gotcha, if you have a looping Timeline animation with a single trigger, the Enter event will only be called once even if it loops back (since it will never "leave" the trigger). If you want the trigger to be called on every loop, make sure to have at least another empty trigger (e.g. halfway) so the first trigger re-enters every time the second trigger exits (when looping back to frame 0)
 
Last edited:
Back
Top Bottom