Animation Timing Help

skippyskippy Member Posts: 106
edited November -1 in Working with GS (Mac)
Hi Guy's I'm off to bed to rest my brain, i love this whole game creating process even if it's exhausting, if you have an animation looping and say at the tenth one you want your actor to throw a rock or something i'm finding it difficult to line up the timing with a timer to actually make the actor throw it in time for eg : you run the animation at 10 frames per sec and the timer has your rock spawning every second, then the animation might look ok then starts running ahead of the spawning rock. My question can i have an attribute to spawn the rock exactly at the tenth animation so its perfect every time or is there another way ?

Comments

  • synthesissynthesis Member Posts: 1,693
    The game engine doesn't keep that good of time synchronization...as the processor will take more time to execute some tasks (such as timers) than to execute animation loops (rendering graphics).

    To ensure that you have proper sequencing...you would need to break the animation in multiple parts and use some attributes to sequence the different parts together...which can be cumbersome and difficult perhaps.

    There is no way to target a specific frame within an animation (that I know of). But you could have a change image sequence to occur every 1/10th of second and allow different things to happen in each part of the sequence.

    Or a simpler solution might be to do a rule where "when the actor is hit by the rock switch" = true...change image to "hitByRockImage" and after 1 second...flip the switch off...otherwise...play the animation when the hit by rock switch is off". Its not as smooth or perfect...but it would work at the proper time sequencing...similar to the old 80s game "Duck Hunt".

    If there is a large amount of difference between the "strike image" and the base animation...such as a cartoon "POW" star behind the duck (or whatever you are throwing rocks at)...then the gamer won't mind the sudden graphics shift...and it will make the strike more visually noticeable to boot.
  • skippyskippy Member Posts: 106
    Thanks Synth, when i woke up this morning i mucked around some more with the timer and got it pretty good now, with my other animated characters i got them all working well but it was the one last night that was a little frustrating to time correctly, i also found that if you put the same image in twice during some parts of the animation like say when the actor releases the rock at the end have the same image twice before it loops and it can help you time it better with the spawned rock.
Sign In or Register to comment.