Author |
Message |
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
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- 0 turns off the animation 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.
Attachments:
File comment: sample... NOT DONE YET
Wolf.rtev2.rar [270.1 KiB]
Downloaded 213 times
|
Wed Feb 10, 2010 5:32 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
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.
|
Wed Feb 10, 2010 5:49 am |
|
|
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
Re: sprite animation that doesnt loop
Dude Dragonxp that's awesome, nice list. Yeah I'm still looking for a solution to this one.
|
Wed Feb 10, 2010 5:58 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
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.
|
Wed Feb 10, 2010 6:00 am |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
Re: sprite animation that doesnt loop
You will have to use lua.
|
Wed Feb 10, 2010 6:18 am |
|
|
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
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.
|
Wed Feb 10, 2010 6:29 am |
|
|
wiffles
Joined: Fri May 08, 2009 1:39 am Posts: 482 Location: Playing a children's card game
|
Re: sprite animation that doesnt loop
Yes pray to TLB, Grif and cavecricket, and thou shalt have a bette chance o' succes
|
Thu Feb 11, 2010 1:16 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: sprite animation that doesnt loop
If TLB can't do it, no body can.
|
Thu Feb 11, 2010 1:16 am |
|
|
TorrentHKU
Loose Canon
Joined: Sun Mar 29, 2009 11:07 pm Posts: 2992 Location: --------------->
|
Re: sprite animation that doesnt loop
Data could.
|
Thu Feb 11, 2010 1:17 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: sprite animation that doesnt loop
Hyperkultra wrote: Data could. I guess your right, he could manipulate the game engine to do it xD
|
Thu Feb 11, 2010 1:18 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
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.
|
Thu Feb 11, 2010 2:26 am |
|
|
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
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.
|
Thu Feb 11, 2010 3:02 am |
|
|
|