Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Three frame movment to 3.0 Four frame movment help.


lel
 Share

Recommended Posts

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

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

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

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

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.
Link to comment
Share on other sites

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

You 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...