The Daily Click ::. Forums ::. Klik Coding Help ::. Is there anyway to replay an animation while the same animation is playing?
 

Post Reply  Post Oekaki 
 

Posted By Message

JetpackLover



Registered
  01/03/2007
Points
  212
10th February, 2009 at 16:07:36 -

Basically what the topic says but I'll clarify it some more.

I have this animation for a projectile that gradually gets smaller as it goes(basically the last few frames before the animation ends get smaller until it is gone) and when the player hits it with his weapon I want it to reflect back. Problem is when he hits it back its still playing its animation and by the time the hit projectile leaves his weapon its basically dead.

So just to sum this up, how do you replay an animation that is already playing?

Also what specifically is the High speed, Low Speed in the animation editor for exactly?

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
10th February, 2009 at 16:27:56 -

I haven't fully grabbed the concept of what you meant. Could you send an mfa?

And the speed frequencies are for the maximum and minimum animation speed on oh... say, a walking animation. Basically the faster your character's (Or whatever you've got in mind)speed is, the faster your character's animation is. Depending on how you set it's limitations. If you set min and max to 50, then there would be no change in anim speed at all.

Edited by W3R3W00F

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
10th February, 2009 at 16:48:08 -

Yes, the min and max animation speeds are for when you use one of the built-in movements. It just makes it so that the faster the object moves, the faster its animation plays.

For what you're doing you could just store the current animation frame in an alterable value, and always set it manually.

Edited by Sketchy

 
n/a

aphant



Registered
  18/05/2008
Points
  1242
10th February, 2009 at 17:41:14 -

Try the "Restore Animation" action?

 

JetpackLover



Registered
  01/03/2007
Points
  212
10th February, 2009 at 18:24:04 -

I tried using that a few different times but it doesn't work. Why isn't there an option for "replay animation"?

The way I got around this was just playing another animation that was identical but still...that a lame way to get around it.

Oh and an unrelated gripe, why the hell does the event editor list scroll all damn choppy like. It makes it near impossible to navigate if you have a whole bunch of conditions in 1 line.

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
10th February, 2009 at 18:54:41 -

Mine doesn't choppily scroll. It works normally.

And what you might need to do (I'm just guessing)is put the animation on loop.

Or maybe this is the code you need.

•Start of frame
-(Animation sequence) Stop

Then for whenever you want to start it,

•<your condition>
-(Animation sequence) Start

Then to set it back to the beginning,

•End of animation
-Set frame to frame 1
-Stop

Hope it helped, and if you can, send an mfa and I'll be more able to help you out.



 
n/a

Homemade Games



Registered
  03/02/2009
Points
  18
10th February, 2009 at 18:54:45 -

The best way to view a lot of conditions on 1 line is to double-click on the number of the event line.

 
-------------

(Insert witty stolen catchphrase here.)

Homemade Games



Registered
  03/02/2009
Points
  18
10th February, 2009 at 18:56:30 -


Originally Posted by ωξяξW○○F
Mine doesn't choppily scroll. It works normally.

And what you might need to do (I'm just guessing)is put the animation on loop.

Or maybe this is the code you need.

•Start of frame
-(Animation sequence) Stop

Then for whenever you want to start it,

•<your condition>
-(Animation sequence) Start

Then to set it back to the beginning,

•End of animation
-Set frame to frame 1
-Stop

Hope it helped, and if you can, send an mfa and I'll be more able to help you out.




Or, in the animation editor, under the "Direction Options" tab, check the "loop" box.

 
-------------

(Insert witty stolen catchphrase here.)

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
10th February, 2009 at 18:59:03 -

That's what I said on one of the top lines.

Edited by W3R3W00F

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
10th February, 2009 at 19:18:29 -

Just so you know dudehuge, the animation frames on active objects are numbered 0,1,2,3 etc. Also you can manually change them in the event editor to gain more control over them.

So you can choose to put the projectile animation events into a group, and disable the group as soon as the player hits the projectile. (not a good idea when there will be multiple objects at once)

Or you can run a timer for each projectile shot (using the projectile's own alterable values to make sure it works for each instance of the object) then manually set the animation frames at the timer gets higher or lower or whatever. Flags are also unique to each object so thats would work well disabling the animation
a rough example would be.

enemy shoots projectile --> set projectile alterable value a to 100
projectile alterable value a greater than 0 + flag 0 is off --> subtract 1
projectile alterable value a equal or lower than 0 --> destroy

(flag 0 will be the projectile's flag 0. The animation will freeze as soon as the flag is not set to off)

projectile alterable value a equal 100 --> set animation frame to 0
projectile alterable value a equal 70 --> set animation frame to 1
projectile alterable value a equal 40 --> set animation frame to 2
projectile alterable value a equal 10 --> set animation frame to 3

Player hits projectile --> set projectile's flag 0 on


 
.

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
11th February, 2009 at 07:45:39 -

You could do something like, Set animation level to Counter ... Shoot button ---> set flag 1 to on ... If Flag 1 is on --> add to Counter
... If Flag 0 is off --> subtract to Counter ... Animation level < 0 --> do damage to enemy ... Animation level > (whatever the highest number of your anim is) --> do damage to player.

That would probably work.

Imho, the actives animations are rather stubborn and buggy (at least in TGF1) ... so if you have to, you could always use an FLC, or AVI file for the animation. This can be helpful as setup for changing the animation frames of FLC and AVI files in TGF is much easier than that of Actives for some reason.

AVI's are not good for transparencies though. FLC can do transparencies but is a rather old "outdated" file format.

Use JASC Animation Shop 3 or something equal to it to create FLC files.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
11th February, 2009 at 11:22:44 -

You can just add to an alterable value and set the frame of the animation to whatever that alterable value is. Then when you want to restart it, just set the alterable value to 1. This also gives you much more control over the animation, since for some reason "Set Frame" never seems to let me continue the animation from that point, just... set it's frame.

 
http://www.facebook.com/truediamondgame

RedEnchilada

formerly RedEchidna

Registered
  01/08/2008
Points
  301

VIP MemberWii OwnerThe Cake is a LiePicture Me This Round 24 Winner!
13th February, 2009 at 02:14:30 -

Why do you guys complicate everything?

Make a 1x1 black frame in an unused animation. Then just change the animation to the animation with the black pixel, and change it back in the same event.

 
http://www.youtube.com/watch?v=WYrSD35vHo4
woooooooooooooooooaah maaaaaaaaaaaaaaaaaaaaan

JetpackLover



Registered
  01/03/2007
Points
  212
13th February, 2009 at 03:00:55 -

Hmmm I'm gonna try that out

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


aphant



Registered
  18/05/2008
Points
  1242
13th February, 2009 at 07:25:15 -


Originally Posted by RedEchidna
Why do you guys complicate everything?

Make a 1x1 black frame in an unused animation. Then just change the animation to the animation with the black pixel, and change it back in the same event.



The alterable value thing works, though. I used it yesterday to create a really cool animation effect for my game.

 
   

Post Reply



 



Advertisement

Worth A Click