Is there a known issue with the timer set to every?

LordTarantorLordTarantor Member, PRO Posts: 890
edited November -1 in Working with GS (Mac)
I have an actor and I want it to animate every 6 seconds. the animation only last 2 seconds so I want like 4 seconds of the normal image between the animation.
I also try checking the Run to completion but nothing.

What I am doing is this:
Timer
Every 6 seconds
Animate
I checked the Restore actor image box.

AM I doing something wrong or is there a bug in the timer?

Comments

  • mangaroomangaroo Member Posts: 419
    i have never gotten the ANIMATE to work with an every timer myself so you aren't alone on that.
  • LumpAppsLumpApps Member Posts: 2,881
    Might be a bug I tried this to let a character blink but in the end I used a change image instead of animation.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi LordTarantor, yes, as mangaroo implies, timers and animation aren't friends. A workaround is to "pack" your animation with alpha zero blank images at the end of the animation sequence, to fill up the "waiting space". Then set the animation to loop.
  • LordTarantorLordTarantor Member, PRO Posts: 890
    That's a good workaround but would it affect the game? Any way it will not work because the animation goes with a sound and I just noticed that the same issue happens with the sound. And the workaround will be a pain when trying to sinc the sound.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    As long as the sound is "packed out" with silence to the same length of animation, and the animation length is perhaps a decent round number (and not too long), I think the game engine should time them together pretty much perfect; though haven't tested that.

    Maybe they can be coordinated with a boolean, just thought. A timer set to every and a boolean (when true set to false, when false set to true), when the boolean is true, animation + sound plays. Should work quite nicely.
  • mangaroomangaroo Member Posts: 419
    I usually just do like gyroscope and fills with blanks although 4 seconds may be a lot of blank images - im not sure why it isnt working for you but perhaps something like

    rule = when animation1 is on
    animate
    timer after 2 seconds
    disable animation1 and enable animation2

    rule = when animation2 is On
    animate
    timer after 4 seconds
    disable animation2 and enable animation1

    ? - ofcourse needs to start with animation1 enabled
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Hey guys, Thanks a lot.
    Working with your ideas, this is what I came up:
    I create a timer wich changes every 6 seconds a boolean att called reanimate to true.
    I checked Run to Completion
    In the actor I put a rule:
    When att game.reanimate is true.
    Animate
    Play Sound
    Timer: after 2 Run to completion
    Change att game.reanimate to false.

    It works amazing.
    Thanks again guys.
Sign In or Register to comment.