I'm working on a little thing where I point to a sprite and the sprite is outlined. But when I change the view offset, everything gets, well offset. I use ScreenToWorldX and Y but something isn't taking this in to consideration for some reason.
What am I doing wrong?
activeTile = GetSpriteHit(ScreenToWorldX(GetPointerX()), ScreenToWorldY(GetPointerY()))
If activeTile > 0
TX# = GetSpriteX(activeTile)
TY# = GetSpriteY(activeTile)
TW# = GetSpriteWidth(activeTile)
TH# = GetSpriteHeight(activeTile)
DrawBox(TX# + viewOffsetX#, TY#, viewOffsetX# + TX# + TW#, TY# + TH#, MakeColor(163, 73, 164), MakeColor(163, 73, 164), MakeColor(163, 73, 164), MakeColor(163, 73, 164), 0)
EndIf