Animation with Timer Problem

KamazarKamazar Member Posts: 287
edited November -1 in Working with GS (Mac)
Ok, so basically all I'm doing is having an actor animate blinking every so-and-so seconds. The thing is, if I set up the timer to do so, it won't. If I set it up just to animate though, without a timer, it will. Even if I set up the time as "for" or "after" but not for "every". My bandaid solution for now is to create a new actor that blinks, but it takes up resources, and everytime my character blinks, it stops dead in it's track. The momentum doesn't carry over since I'm deleting and respawning actors. Little help? Thanks

- A Perfectionist

Comments

  • ktfrightktfright Member Posts: 964
    So you are trying to animate and blink, or are you having a problem with blinkng while you are moving?
  • JGary321JGary321 Member Posts: 1,246
    I assume you are following this for the blinking???

    http://gamesalad.com/wiki/how_tos:gsc_blinking_image

    You have run to completion on i assume as well??
  • KamazarKamazar Member Posts: 287
    Sorry, I meant literally blinking. As in a standard animation of my character blinking his eyes.

    I'm having trouble making my character brings in intervals with a timer. It just won't animate.

    Edit: And another question. When I'm destroying and respawning an actor, how do I get the momentum the first actor had to the new actor?
  • JGary321JGary321 Member Posts: 1,246
    Hey Kamazar this is what I would TRY:

    Create actor attribute called "BlinkingAnim" (Boolean)
    Timer: every 3-8 (just for randomness) secs change self.BlinkingAnim to true

    Rule:
    When BlinkingAnim = True
    Animation (blinking animation goes here of course)
    Timer: After 1-2 secs change self.BlinkingAnim to false.

    Otherwise:
    Normal animation goes here.

    This works UNLESS you will have multiple animations. So for instance if you have an animation for attacking, this will mess it up b/c of the OTHERWISE part. Easy fix though:

    Create actor attribute called "BlinkingAnim" (Integer)
    Timer: every 3-8 (just for randomness) secs change self.BlinkingAnim to 1

    Rule:
    When BlinkingAnim = 1
    Animation (blinking animation goes here of course)
    Timer: After 1-2 secs change self.BlinkingAnim to 0

    Rule:
    When BlinkingAnim = 0
    Animation (normal one)

    This way you could also through in attack animations by using different values.

    Did not test this, but SHOULD (yes that frightening word) work.
  • KamazarKamazar Member Posts: 287
    Thanks, JGary, I'll try that out ;)
  • KamazarKamazar Member Posts: 287
    Alright, it kinda works. The animation action is being carried out, but it goes by so fast (or so it seems), them the blink is barely perceptible. I've changed the frame rate, but it doesn't help at all. I'm guessing this is a bug?
  • KamazarKamazar Member Posts: 287
    Hate to triple post, but it works. I was wrong :P
Sign In or Register to comment.