• Hi Guest!

    We are extremely excited to announce the release of our first Beta for VaM2, the next generation of Virt-A-Mate which is currently in development.
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.

Logic Brick Question

pizzlepole

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