Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sprite Change Error
#1
I added a sprite change, damage, and heal attribute to my game. Now, the damage and heal work nicely, but the sprite change is buggy. When i walk through it I literally warp through it (I move so fast). And after I head through say up, my characters poisition is not true (it is 1 more upwards than I really am). This goes for all directions (any direction I walk through the SC tile, I get off by 1 in that direction). The change of sprites works though. I noticed this because I would hit my damage/heal tiles impropery after I changed sprites.

Here is my sc code (in playermovement on the server side - calculated at the vary end (before it checks for position modification)):
Code:
' Check for sprite change
    If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_SPRITE Then
        'TempSprite = GetPlayerSprite(Index)
        Call SetPlayerSprite(Index, Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data1)
        Call SendPlayerData(Index)
        Moved = YES
    End If
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)