Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
There is a specific tuto for your map to screen.
When using "worldX, worldY = map.screenToMap" or "pixelX, pixelY = map.mapToScreen" you're effectively drawing a map that you can't see.
-'mapX' & 'mapY' are the coordinates that this invisible map is centred on; the same as the "screen.drawMap" function but 'x' & 'y' are now 'mapX & 'mapY'
-'zoom' is the zoom of the invisible map
-'screenW' & 'screenH' are the width and height of your screen
-'worldX' & 'worldY' are the in-game world coordinates that you want to convert into the pixel
locations 'pixelX' & 'pixelY'
-'pixelX & 'pixelY' are the pixel locations you want to turn into world coordinates (remember pixel
locations go from top left to bottom right)
Hope this helps, sorry if I went into too much detail, this is my first steam discussion comment. Remember you still need to use the "screen.drawMap" to see a map; the "map.screenToMap" and "mapToScreen" functions are just used to convert between world coords and pixel locations so you can do things such as tracking your GPS with a red dot while moving the map independently.
Essentially, what that command is doing is converting world co-ordinates into screen (in game monitor) co-ordinates. In order for it to be able to do this, you need to give it the parameters of the "map image" displayed on the screen, which is what those first 5 parameters are about.
As above, the "map image" itself needs to be created with another command.
You gave all the useful information, I just added a bit of context. :)
How to make an red dot while moving independently?
Can you say me if I need screenToMap for mapToScreen?
and which x or y I need in screen.drawCircleF