Animation Timing Help
skippy
Member Posts: 106
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
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.