display map correctly

Hi,

First of all, I am very new to MTE and Tiled but I wanted to try something out (bought it just a few hours ago) :wink:

Just like your “Getting Started” Guide, I created a tileset in TexturePacker - the packed png file has these dimensions: width = 962, height = 322

-Then I created a new map in Tiled using these settings:

http://img69.imageshack.us/i/mwez.png

-I´ve added my new tileset:
http://img708.imageshack.us/i/8wy.png/

-added the object in the level:
http://img854.imageshack.us/i/mjb5.png/

  • but when I added these lines of code to the main.lua the level was scaled down or something like this

http://img835.imageshack.us/i/v91.png/

http://img341.imageshack.us/i/bni.png/

I have played with the “blockScale” variable a bit but even at higher values like 300 the scene was scaled in a weird way.

Is there any way to display the map just like it is shown in the map editor? I guess I am missing something :wink:

Sincerely,

Max / CineTek
 

mte.loadMap("testMap") blockScaleX = 960 blockScaleY = 322 mte.goto({locX = 1, locY = 0.4, blockScale = 32})

Your code creates two global variables named blockScaleX and blockScaleY with the correct dimensions, but your goto command sets the blockScale to 32. Calling the goto using your blockScaleX and blockScaleY values should display the tile at the correct size.

mte.loadMap("testMap") local blockScaleX = 960 local blockScaleY = 322 mte.goto({locX = 1, locY = 0.4, blockScaleX = blockScaleX, blockScaleY = blockScaleY})

Thanks for the fast reply :slight_smile:

It does work now and I am looking forward to your next release!!

Sincerely,

Max / CineTek

mte.loadMap("testMap") blockScaleX = 960 blockScaleY = 322 mte.goto({locX = 1, locY = 0.4, blockScale = 32})

Your code creates two global variables named blockScaleX and blockScaleY with the correct dimensions, but your goto command sets the blockScale to 32. Calling the goto using your blockScaleX and blockScaleY values should display the tile at the correct size.

mte.loadMap("testMap") local blockScaleX = 960 local blockScaleY = 322 mte.goto({locX = 1, locY = 0.4, blockScaleX = blockScaleX, blockScaleY = blockScaleY})

Thanks for the fast reply :slight_smile:

It does work now and I am looking forward to your next release!!

Sincerely,

Max / CineTek