lel Posted May 28, 2013 Author Share Posted May 28, 2013 I have had my engine converted from a hybrid 2.3, into a hybrid 3.0.Before I had my bmp sprites moving at 3 frame movment. Now I have them using 3 frame movment and PNG, but they seem to make my character dissapear when I use CTRL actions and the animations skip a little bit.I'm guessing its best to just delete the current sprite movment and go off of the defualt sprite set that 3.0 normally uses.I do have JC Denton Denton Denton's pet system, but IIRC JC Denton Denton Denton said it doesn't matter.Anyone mind giving me a small guide on fixing this?Thanks in advance. Link to comment Share on other sites More sharing options...
Zeno Posted May 28, 2013 Share Posted May 28, 2013 No clue on the skipping animations.One problem for disappearing sprites could be the anim variable. Find something like this in DrawPlayer:``` ' Check for attacking animation If TempPlayer(Index).AttackTimer + (attackspeed / 2) > GetTickCount Then If TempPlayer(Index).Attacking = 1 Then```An anim of 3 will look for a sprite starting at x=132\. A quick fix is to just make sure anim is less than 3 (usually 2). There's a similar code in DrawNPC. Link to comment Share on other sites More sharing options...
lel Posted May 28, 2013 Author Share Posted May 28, 2013 Thanks Zeno, I'll try it in a few hours and let you know how it goes.I wouldn't mind hearing what others have to say, just in case this doesn't work.Thanks again everyone. Link to comment Share on other sites More sharing options...
lel Posted May 28, 2013 Author Share Posted May 28, 2013 What zeno suggested worked in that area. I'm going to try to follow a 3 frame animation guide for sprites and see if that fixes the rest of the problems.Edit: Also I thought I only needed to fix the one area (players) but I had to apply it to pets, and NPC respectfully as well.Thanks zeno. Link to comment Share on other sites More sharing options...
Zeno Posted May 28, 2013 Share Posted May 28, 2013 I'm still unsure what you meant by animations skipping. It's a very vague description (something like "frames missing" or "frame played twice" would be much more helpful).To save you some hunting, here's the basics of 3 frame movement:ProcessMovement algorithm for 3 frames:``` If Player(index).Step = 0 Then Player(index).Step = 2 Else Player(index).Step = 0 End If```Frame reset in DrawPlayer/bltPlayer:```anim = 1```Attacking animation in DrawPlayer/bltPlayer and DrawNPC/bltNPC:```anim = 2``` Link to comment Share on other sites More sharing options...
lel Posted May 29, 2013 Author Share Posted May 29, 2013 Fixed everything, I had to do NPC and pets differently, their reset numbers were 0 strangly enough.And I used something likeIf Player(index).Step = 1 ThenPlayer(index).Step = 2ElsePlayer(index).Step = 1End IfIn one or two cases.But This can be marked as "resoveled"Thanks alot Zeno!It was nice having to try and figure alittle bit of it out myself too, heh… interesting. Link to comment Share on other sites More sharing options...
Zeno Posted May 29, 2013 Share Posted May 29, 2013 Glad to hear you got it working! Woo debug! hahaYou can mark it resolved yourself. Use the full editor on your first post. ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now