Retrieve or create tiles by tmx string which is the exported file of tile map editor.
Categories > Board > rex_tmx_importer_v2IntroductionLinksDependenceUsageImport tmx fileOffset of tilesCreate tilesSingle tick modeMultiple ticks modeRelease tmx objectObject layerRetrieve propertiesRetrieve propertiesRetrieve layersRetrieve tiles at logic X,YConfigure board objectFilling tilemapOfficial save/load
Calls Action:Import tmx
to import tmx string with a parser.
The offset of tiles is defined in
X at (0,0)
, Y at (0,0)
, orAction:Set instance position of (0,0)
. It affects the created tiles (Action:Create tiles
, or Action:Create tiles in a duration
), and Expression:PhysicalX
, Expression:PhysicalY
.
Calls one of these action after importing tmx string (Action:Import tmx
)
Action:Retrieve tile array
, retrieves each cell in a single tick.
Trigger Condition:On each tile cell
for each cell
Create tile instance manually by System action:Create
Expression:PhysicalX
, Expression:PhysicalY
), Expression:LayerName
, and Expression:Frame
More properties of tiles
Expression:TileID
Expression:LogicX
, Expression:LogicY
)`Expression:IsMirrored
, Expression:IsFlipped
Expression:TileProp( name )
Properties of layer
Expression:LayerProp( name )
, Expression:LayerOpacity
Properties of tileset
Expression:TilesetName
Expression:TilesetProp( name )
Expression:ImageSource
, Expression:ImageWidth
, Expression:ImageHeight
And properties of map
Expression:MapProp( name )
Expression:BackgroundColor
Expression:MapWidth
, Expression:MapHeight
Expression:TileWidth
, Expression:TileHeight
Expression:TotalWidth
, Expression:TotalHeight
Expression:POX
, Expression:POY
Action:Create tiles
, creates tile instances at the layer with the same name defined in tmx string, in a single tick.
Condition:On each tile cell
for each cell, and picks created instance into SOL.Action:Retrieve tile array in a duration
, retrieves each cell in multiple ticks. (sample capx)
Triggers Condition:On each tile cell
for each cell.
Triggers Condition:On retrieving duration
for each processing tick,
Expression:RetrievingPercent
, to get percentage of processingTriggers Condition:On retrieving finished
when processing completed.
Set processing time of each tick in property Processing time
Processing time
second, assume that 1 tick = 1/60 secondAction:Create tiles in a duration
, creates tile instances in multiple ticks.
Calls Action:Release tmx object
to release parsing result from memory.
DO NOT release tmx object during retrieving processing (Action:Retrieve tile array in a duration
, Action:Create tiles in a duration
)
It retrieves object layers under Condition:On each object
, get properties of object by
Expression:ObjectName
, Expression:ObjectType
, Expression:ObjectX
, Expression:ObjectY
) , logical positionExpression:ObjectWidth
, Expression:ObjectHeight
Expression:ObjectProp( name )
Condition:For each map property
, to retrieve map properties
Expression:CurMapPropName
, Expression:CurMapPropValue
Condition:For each layer property
, to retrieve layer properties
Expression:CurLayerPropName
, Expression:CurLayerPropValue
Condition:For each tileset property
, to retrieve tileset properties
Expression:CurTilesetPropName
, Expression:CurTilesetPropValue
Condition:For each tile property
, to retrieve tile properties
Expression:CurTilePropName
, Expression:CurTilePropValue
Condition:For each layer
, to retrieve layers,
Expression:LayerName
Condition:For each layer property
, to retrieve layer propertiesSample capx
Call Condition:For each tile at logic XY
to get properties of tiles at logic X,Y, to create a part of tiles in a specific logic position.
Configure these objects to store tiles in rex_board object.
Action of board | Expression of TMX |
---|---|
Action:Set board width | Expression:MapWidth |
Action:Set board height | Expression:MapHeight |
Action of squareTx | Expression of TMX |
---|---|
Action:Set orientation by number | Expression:IsIsometric |
Action:Set cell size | Expression:TileWidth, Expression:TileHeight |
Action of hexTx | Expression of TMX |
---|---|
Action:Set layout by number | Expression:IsUp2Down, Expression:IsIndent |
Action:Set cell size | Expression:TileWidth, Expression:TileHeight |
Sample capx
Calls Action:Reset tilemap
to resize the official tilemap object and fill tile ID with a tmx layer.
Sample capx This plugin support official save/load.