3 framed characters

Hi , can you tell me how to change the code in Eclipse Nightly dx8
to make the engine read 3 frames for the character? and not 4 like it should be

(it’s for vx characters) because 3 framed give a good look than 4

for example :

There is a tutorial in here somewhere but I don’t have the link
What it basically does is sets the first frame as the 4th frame.
Not sure if it can be used for VX sprites though. You can always rip from CS:DE

Ok thanks i will look then 😛 !
Rip that’s a word not familiar to me (i’m joking the reality is that i don’t know vb6 that much to rip)
Thanks for replying me fast 🙂

Check in the source tutorial index. I tried searching using the search bar didn’t get it. There was another topic not long ago that was started asking whether it was possible and the link was given there.

Woow thanks !! 😄 thats a little time i’m here and i never noticed there were an index 😮
Really thanks very much i’m still searching 🙂

I have to go now. When I come back I can find for you.
P.S there is a search function in your browser
CTRL+F
😛

Ok thanks 😛

Not found :’(

I think there are no tutorial for this…

Sherwin you posting for post count?
Ontopic: I’ll find it for you.

@TheChoosenOne:

Sherwin you posting for post count?
Ontopic: I’ll find it for you.

No , I’m just telling the truth …. Just rip it at CS:DE

There is a tut in this forums somewhere.

@TheChoosenOne:

There is a tut in this forums somewhere.

If there is one then post the link  herp derp,it would be more usefull than talking nonsense.

Peace

Okay I give up. But believe me I have seen a link to a tut somewhere that puts the 1st sprite as the 4th sprite. If i remember correctly the link was posted by Soul

Here is the DrawPlayer from CS:DE  (DX8)

! ```
Public Sub DrawPlayer(ByVal index As Long)
    Dim Anim As Byte
    Dim i As Long
    Dim x As Long
    Dim y As Long
    Dim sprite As Long, spritetop As Long
    Dim rec As GeomRec
    Dim attackspeed As Long

’ pre-load sprite for calculations
    sprite = GetPlayerSprite(index)
    'SetTexture Tex_Char(Sprite)

!     If sprite < 1 Or sprite > Count_Char Then Exit Sub
!     ’ speed from weapon
    If GetPlayerEquipment(index, Weapon) > 0 Then
        attackspeed = Item(GetPlayerEquipment(index, Weapon)).speed
    Else
        attackspeed = 1000
    End If
!     If Not isConstAnimated(GetPlayerSprite(index)) Then
        ’ Reset frame
        Anim = 1
        ’ Check for attacking animation
        If Player(index).AttackTimer + (attackspeed / 2) > GetTickCount Then
            If Player(index).Attacking = 1 Then
                Anim = 2
            End If
        Else
            ’ If not attacking, walk normally
            Select Case GetPlayerDir(index)
                Case DIR_UP
                    If (Player(index).yOffset > 😎 Then Anim = Player(index).Step
                Case DIR_DOWN
                    If (Player(index).yOffset < -8) Then Anim = Player(index).Step
                Case DIR_LEFT
                    If (Player(index).xOffset > 😎 Then Anim = Player(index).Step
                Case DIR_RIGHT
                    If (Player(index).xOffset < -8) Then Anim = Player(index).Step
            End Select
        End If
    Else
        If Player(index).AnimTimer + 100 <= GetTickCount Then
            Player(index).Anim = Player(index).Anim + 1
            If Player(index).Anim >= 3 Then Player(index).Anim = 0
            Player(index).AnimTimer = GetTickCount
        End If
        Anim = Player(index).Anim
    End If
!     ’ 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
!     ’ Set the left
    Select Case GetPlayerDir(index)
        Case DIR_UP
            spritetop = 3
        Case DIR_RIGHT
            spritetop = 2
        Case DIR_DOWN
            spritetop = 0
        Case DIR_LEFT
            spritetop = 1
    End Select
!     With rec
        .top = spritetop * (D3DT_TEXTURE(Tex_Char(sprite)).height / 4)
        .height = (D3DT_TEXTURE(Tex_Char(sprite)).height / 4)
        .left = Anim * (D3DT_TEXTURE(Tex_Char(sprite)).Width / 4)
        .Width = (D3DT_TEXTURE(Tex_Char(sprite)).Width / 4)
    End With
!     ’ Calculate the X
    x = GetPlayerX(index) * PIC_X + Player(index).xOffset - ((D3DT_TEXTURE(Tex_Char(sprite)).Width / 4 - 32) / 2)
!     ’ Is the player’s height more than 32…?
    If (D3DT_TEXTURE(Tex_Char(sprite)).height) > 32 Then
        ’ Create a 32 pixel offset for larger sprites
        y = GetPlayerY(index) * PIC_Y + Player(index).yOffset - ((D3DT_TEXTURE(Tex_Char(sprite)).height / 4) - 32) - 4
    Else
        ’ Proceed as normal
        y = GetPlayerY(index) * PIC_Y + Player(index).yOffset - 4
    End If

RenderTexture Tex_Char(sprite), ConvertMapX(x), ConvertMapY(y), rec.left, rec.top, rec.Width, rec.height, rec.Width, rec.height
End Sub


And here is the Process Movement

>! ```
Sub ProcessMovement(ByVal index As Long)
Dim MovementSpeed As Long
>!     ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler
>!     ' Check if player is walking, and if so process moving them over
    Select Case Player(index).Moving
        Case MOVING_WALKING: MovementSpeed = RUN_SPEED '((ElapsedTime / 1000) * (RUN_SPEED * SIZE_X))
        Case MOVING_RUNNING: MovementSpeed = WALK_SPEED ' ((ElapsedTime / 1000) * (WALK_SPEED * SIZE_X))
        Case Else: Exit Sub
    End Select

    Select Case GetPlayerDir(index)
        Case DIR_UP
            Player(index).yOffset = Player(index).yOffset - MovementSpeed
            If Player(index).yOffset < 0 Then Player(index).yOffset = 0
        Case DIR_DOWN
            Player(index).yOffset = Player(index).yOffset + MovementSpeed
            If Player(index).yOffset > 0 Then Player(index).yOffset = 0
        Case DIR_LEFT
            Player(index).xOffset = Player(index).xOffset - MovementSpeed
            If Player(index).xOffset < 0 Then Player(index).xOffset = 0
        Case DIR_RIGHT
            Player(index).xOffset = Player(index).xOffset + MovementSpeed
            If Player(index).xOffset > 0 Then Player(index).xOffset = 0
    End Select
>!     ' Check if completed walking over to the next tile
    If Player(index).Moving > 0 Then
        If GetPlayerDir(index) = DIR_RIGHT Or GetPlayerDir(index) = DIR_DOWN Then
            If (Player(index).xOffset >= 0) And (Player(index).yOffset >= 0) Then
                Player(index).Moving = 0
                If Player(index).Step = 0 Then
                    Player(index).Step = 2
                Else
                    Player(index).Step = 0
                End If
            End If
        Else
            If (Player(index).xOffset <= 0) And (Player(index).yOffset <= 0) Then
                Player(index).Moving = 0
                If Player(index).Step = 0 Then
                    Player(index).Step = 2
                Else
                    Player(index).Step = 0
                End If
            End If
        End If
    End If

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "ProcessMovement", "modGameLogic", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
>! ```

You don’t suppose this can be just copied and pasted do you?

@Abhi2011:

You don’t suppose this can be just copied and pasted do you?

If he don’t have CS:DE i posted the codes so he should figure it out how to do that in EO 3.0
or whatever he use.

go away

You really don’t know english do you? What I meant is that the code you posted can be directly be added to EO 3.0?

I don’t understand anything , could anyone just give me a link ?
i’m still searching it but i think i just use the bad key-words

@Abhi2011:

You really don’t know english do you? What I meant is that the code you posted can be directly be added to EO 3.0?

I’m sorry sir if i offended you that i’m a japanese and my english sux, that can NOT just be copy pasted and expect to work,because CS:DE have other stuff there .

Peace

Log in to reply