I'm to make a generic Sub I can call to Swap out the player's tileset but cannot seem to figure out the path. I modified some code I found but it just overlays the Player tileset. And I want to change the tileset.
Sub SwapTileSet(NewTileSet)
Dim TS
With ProjectObj.GamePlayer
Set TS = ProjectObj.TileSetDef(NewTileSet)
If Not TS.IsLoaded Then
TS.Load
End If
If TS.LoadedInstance Is Nothing Then
Set TS.LoadedInstance = CurrentDisplay.CreateTileSet( _
TS.Image, TS.TileWidth, TS.TileHeight)
End If
CurrentDisplay.DrawTile _
TS.LoadedInstance, _
.PlayerSprite.CurTile, _
.PlayerSprite.X - .MapScrollX, _
.PlayerSprite.Y - .MapScrollY, _
0, 0, 640, 480, True
End With
End Sub