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

[EOxmas] 3x3 Sprites


MCADAMS
 Share

Recommended Posts

Using these sprites:
![](http://i.imgur.com/Cv82J.png)
and this code:
```
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
```My characters looked like this:
![](http://i.imgur.com/eI8DF.png)

Now, I changed that code to this:
```
With rec
        .top = spritetop * (DDSD_Character(Sprite).lHeight / 4)
        .Bottom = .top + (DDSD_Character(Sprite).lHeight / 4)
        .left = Anim * (DDSD_Character(Sprite).lWidth / 3)
        .Right = .left + (DDSD_Character(Sprite).lWidth / 3)
    End With
```And they look like this:
![](http://i.imgur.com/7Ipru.png)
…when not moving

The moving frames look perfect, but every 2 or 3 tiles my character will disappear and then reappear.
![](http://i.imgur.com/YeKIF.png)

Is anyone aware of how to remedy this?  :confused:
Link to comment
Share on other sites

```
If Player(Index).Step = 3 Then
        Anim = 0
    ElseIf Player(Index).Step = 1 Then
        Anim = 2
    End If
```
```
' If not attacking, walk normally
        Select Case GetPlayerDir(Index)
            Case DIR_UP
                If (Player(Index).YOffset > 8) 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 > 8) Then Anim = Player(Index).Step
            Case DIR_RIGHT
                If (Player(Index).XOffset < -8) Then Anim = Player(Index).Step
        End Select
    End If
```are what I get from searching it. I appreciate you trying to teach me this but I fail to understand it.
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...