Help In Animating a fireball

PixeliciousPixelicious Member Posts: 7
edited November -1 in Working with GS (Mac)
Hello Everyone,

I am currently building my first game, and their is a scene i am designing which contains lava. I trying to animate a fireball image that i drew. So far i have enabled it to put a timer that after 4 seconds it would move to a position at a speed. But i don't know how to get it to loop. Can anyone help me please?

Comments

  • PeeCeePeeCee Member Posts: 107
    assuming you haven't seen the animate behavour then

    the actor that moves into position should be the actor that also has the ANIMATE behaviour inside of it with your fireball images .so lets say this actor that moves to a position is called "FIREBALL". now inside of the fireball actor , you put the animate behaviour and all images that animate that fire or lava effect play in sequence and with the same animate behaviour you can set loop.

    hope this helps.
  • PixeliciousPixelicious Member Posts: 7
    Thanks for the advice PeeCee. However what I am trying to do is not animate using frames for that animate function but just to use one still image to, go up and then come down. Then loop that same effect.

    So in this scene I have a pool of lava on the bottom. What I want to do is have the fireball at a start position then to move straight up to the top of the screen and rotate and come down, then loop that same movement after a few seconds. Just like the mario bros underground levels with the fireballs. If you hit it you die.

    Any more suggestions please?
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Depending on how you have things set up -- you might try changing the timer from 'after' 4 seconds to 'every' 4 seconds.
  • PixeliciousPixelicious Member Posts: 7
    Tried that, didn't work. Here is an image describing what i what to do.

    [IMG]http://i54.tinypic.com/2yool1f.jpg[/IMG]
  • PixeliciousPixelicious Member Posts: 7
    Pixelicious said:
    Tried that, didn't work. Here is an image describing what i what to do.

    http://i54.tinypic.com/2yool1f.jpg

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    OK -- place the following two timers and two behaviors into the fireball actor:

    Timer -- Every: 8 seconds
    ----Interpolate Attribute: self.Position.Y, To: 300, Duration: 4, Function: Ease out
    ----Timer -- After: 4 seconds, run to completion
    --------Interpolate Attribute: self.Position.Y, To: 0, Duration: 4, Function: Ease in

    Notice that the second timer is contained inside the first timer. (And that the second interpolate is contained inside the second timer.)

    Also be sure to 'check run to completion' on the second timer.

    That should get you on the right track.
  • PixeliciousPixelicious Member Posts: 7
    Thank you so much works like a charm
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Pixelicious said:
    Thank you so much works like a charm

    Hey, No Problem. Glad it works.

    I still just amazed at how much time/effort/coding is saved with two simple things like a timer container and an interpolate behavior!
Sign In or Register to comment.