Data Realms Fan Forums http://45.55.195.193/ |
|
sprite animation that doesnt loop http://45.55.195.193/viewtopic.php?f=1&t=17789 |
Page 1 of 1 |
Author: | salt_1219 [ Wed Feb 10, 2010 5:32 am ] | ||
Post subject: | sprite animation that doesnt loop | ||
Code: SpriteFile = ContentFile FilePath = Wolf.rte/Images/HeadB.bmp FrameCount = 16 SpriteAnimMode = 1 // for animation was 2 not sure what it does yet SpriteAnimDuration = 10000 // this is animation length in milliseconds Okay so I'm making a character that starts out as a human, then transforms into werewolf form. My only problem is getting the sprite animation to only cycle once. I think SpriteAnimMode controls this-
1 seems to cycle as normal 2 seems to set it to random 3 does nothing So how do I stop the animation? maybe set it up so the sprite gets replaced after say 10 seconds? I'm not sure if this can be done using only ini maybe I need some lua. If this works I will time it so he transforms after exiting the rocket, and will animate the tail growth and hands growing fur. Any help you can offer is greatly appreciated, and if you would like to see my animation DL and check it out in actor viewer.
|
Author: | dragonxp [ Wed Feb 10, 2010 5:49 am ] |
Post subject: | Re: sprite animation that doesnt loop |
Perhaps you should do what i do, make a text document and whenever you read something useful to modding, you copy paste it there. Here is sprite anim modes copied of my notes .txt. SpriteAnimMode 0 = NOANIM 1 = ALWAYSLOOP 2 = ALWAYSRANDOM 3 = ALWAYSPINGPONG 4 = LOOPWHENMOVING 5 = LOOPWHENOPENCLOSE 6 = PINGPONGOPENCLOSE Edit: realized this wasn't your problem. |
Author: | salt_1219 [ Wed Feb 10, 2010 5:58 am ] |
Post subject: | Re: sprite animation that doesnt loop |
Dude Dragonxp that's awesome, nice list. Yeah I'm still looking for a solution to this one. |
Author: | dragonxp [ Wed Feb 10, 2010 6:00 am ] |
Post subject: | Re: sprite animation that doesnt loop |
Look forward to your release! If you ever need anything just pm. Edit: and i forgot to look at your skeleton glow, sorry. |
Author: | MaximDude [ Wed Feb 10, 2010 6:18 am ] |
Post subject: | Re: sprite animation that doesnt loop |
You will have to use lua. |
Author: | salt_1219 [ Wed Feb 10, 2010 6:29 am ] |
Post subject: | Re: sprite animation that doesnt loop |
MaximDude wrote: You will have to use lua. ahh man This will be so cool if I can get it to work right. I shall pray the lua gods smile upon my work. |
Author: | wiffles [ Thu Feb 11, 2010 1:16 am ] |
Post subject: | Re: sprite animation that doesnt loop |
Yes pray to TLB, Grif and cavecricket, and thou shalt have a bette chance o' succes |
Author: | dragonxp [ Thu Feb 11, 2010 1:16 am ] |
Post subject: | Re: sprite animation that doesnt loop |
If TLB can't do it, no body can. |
Author: | TorrentHKU [ Thu Feb 11, 2010 1:17 am ] |
Post subject: | Re: sprite animation that doesnt loop |
Data could. |
Author: | dragonxp [ Thu Feb 11, 2010 1:18 am ] |
Post subject: | Re: sprite animation that doesnt loop |
Hyperkultra wrote: Data could. I guess your right, he could manipulate the game engine to do it xD |
Author: | Mind [ Thu Feb 11, 2010 2:26 am ] |
Post subject: | Re: sprite animation that doesnt loop |
Um if you only want it to go through once then attach this to it. Forgive me if this is dumb and doesn't work. Code: function Create(self) end function Update(self) if self.Frame > 16 then self.Frame = 16 end This would simply make it stop and 16 and go no further and jsut stay there at frame 16. Not sure if that's what you want, so... You could set spriteanimmode to 0 and not animate at all and do something to where you could animate the frames as fast as you wanted Code: function Create(self) self.timer = Timer(); end function Update(self) if self.timer:IsPastSimMS(desiredMS for each frame) == true then self.timer:Reset(); if self.Frame < 16 then self.Frame = self.Frame + 1 else self.Frame = 0 end end end Props to Grif for the second code. |
Author: | salt_1219 [ Thu Feb 11, 2010 3:02 am ] |
Post subject: | Re: sprite animation that doesnt loop |
wow thanks mind and grif too I will try this out, right now I'm working on tweaking my animation so my werewolf transforms smoothly. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |