Three frame movment to 3.0 Four frame movment help.

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.

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.

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.

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.

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

Fixed everything, I had to do NPC and pets differently, their reset numbers were 0 strangly enough.

And I used something like

If Player(index).Step = 1 Then

Player(index).Step = 2

Else

Player(index).Step = 1

End If

In 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.

Glad to hear you got it working! Woo debug! haha

You can mark it resolved yourself. Use the full editor on your first post. ;)

Log in to reply