[Help] - Run frame [EO2.0]

Hello , someone could help me ?
I need a frame system for when my character run frame change.
Eclipse Origins 2.0

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)

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

thank you, helped a lot.
only when the character runs the frame is resetting .
You can help me with this?

@‘Belzebu’:

thank you, helped a lot.
only when the character runs the frame is resetting .
You can help me with this?

What do you mean?

when I run the character is so.
It uses frames to run and 1 stopped and return to using the frame run

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?

Looks like the code is going from a to 5 (standing to running) because the original code goes from 1 to 2 (standing to walking) so you’ll have to make it go from 4 to 5 (running stance to running)

@'Mohenjo:

Looks like the code is going from a to 5 (standing to running) because the original code goes from 1 to 2 (standing to walking) so you’ll have to make it go from 4 to 5 (running stance to running)

Exactly!

I am using this sprite sheet so the Nin Online only for testing

still the same thing.

I guess the basic one won’t work then

someone would have one engine with the animation system to run or a complete system of animation to run?

Log in to reply