Export and import a tilemap in JSON [SOLVED]

Discussion and feedback on Construct 2

Post » Fri Mar 10, 2017 10:54 am

Hi, I'm going straight to the point:

- I created a map with a tilemap object.
- I need to export that map to import it later.

The question is, how do I export the map in JSON ?.
I think I should export it in JSON and later import it using AJAX.

I'm right?.

EDIT:

Ok to export use:

Tilemap -> Download the JSON data with filename "tilemap.json"

Later I imported the file to directory "Files" and I load it like this:

AJAX -> Request tilemap.json (tag "level1")

AJAX On "level1" completed -> Tilemap Load tilemap from JSON "tilemap.json"


But this does not work, the map is not loaded on the editor screen, the tilemap object is empty and the level I created has not been loaded.

OK!

this:
AJAX On "level1" completed -> Tilemap Load tilemap from JSON "tilemap.json"

replaced with this
AJAX On "level1" completed -> Tilemap Load tilemap from JSON AJAX.LastData

Solved.
B
29
S
12
G
21
Posts: 782
Reputation: 14,415

Return to Construct 2 General

Who is online

Users browsing this forum: paxto22, Rastacity, Yahoo [Bot] and 3 guests