• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.

Logic Brick Question

pizzlepole

New member
Joined
May 14, 2021
Messages
21
Reactions
10
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