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

[Help] - Run frame [EO2.0]


Belzebu
 Share

Recommended Posts

I can try to point you in the right direction, someone can correct me if I'm wrong. Look for where the frame changes when the character moves and put an if then statement for when the player is running, then just go another frame or two over in the images. (This will require you to edit your images)
Link to comment
Share on other sites

at BltPlayer
find this code

```
' Check to see if we want to stop making him attack
With Player(Index)
If .AttackTimer + attackspeed < GetTickCount Then
.Attacking = 0
.AttackTimer = 0
End If
End With

```
add this below it

```
' Running
If Player(Index).Moving = MOVING_RUNNING Then
Anim = Anim + 4
End If

```
also find this code on BltPlayer too
```
With rec
.top = spritetop * (DDSD_Character(Sprite).lHeight / 4)
.Bottom = .top + (DDSD_Character(Sprite).lHeight / 4)
.Left = Anim * (DDSD_Character(Sprite).lWidth / 4)
.Right = .Left + (DDSD_Character(Sprite).lWidth / 4)
End With

```
replace it with

```
With rec
.top = spritetop * (DDSD_Character(Sprite).lHeight / 4)
.Bottom = .top + (DDSD_Character(Sprite).lHeight / 4)
.Left = Anim * (DDSD_Character(Sprite).lWidth / 8)
.Right = .Left + (DDSD_Character(Sprite).lWidth / 8)
End With

```
find this at bltplayer again

```
' Calculate the X
x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset - ((DDSD_Character(Sprite).lWidth / 4 - 32) / 2)

```
replace it with

```
' Calculate the X
x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset - ((DDSD_Character(Sprite).lWidth / 8 - 32) / 2)

```
The Sprite image formation will be like this

Stand | Walk | Stand | Walk | RunStand | Running | RunStand | Running > Down
Stand | Walk | Stand | Walk | RunStand | Running | RunStand | Running > Left
Stand | Walk | Stand | Walk | RunStand | Running | RunStand | Running < Right
Stand | Walk | Stand | Walk | RunStand | Running | RunStand | Running < Up

This is the basic idea i can think of
Didn't test, but it will work
Link to comment
Share on other sites

So every "cycle" of running it plays a walking frame and then plays the running cycle? If that's the problem then let me take a quick look at the above code and see what is the issue.

The issue isn't with the code (afaik), it seems to be an issue with the frames. Because you're playing the running stand every frame as part of the run cycle. Mind showing me your sprite sheet?
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...