17-05-2008, 11:44 PM
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)):
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