Skip to content

New feature : parsing neighbours ? #8

@MichelVGameMaker

Description

@MichelVGameMaker

Hello !
Thank you for your parser !

I was wondering if you could add the level's neighbours features

1-Parsing the level, would update a map / struct registring all neighbouring levels (for north, south, west, east)
2-A function LDtkNeighbour(_room, _dir) would be available when user needs it to fetch the neighouring levels for the associated _room and in the _dir direction {n, s, w, e}. That way, user can call LDtkNeighbour(room, e) to get the room to the right.

Of course, I'll understand if you can't. Your parser is already very useful.

__neighbours | Array of Object | An array listing all other levels touching this one on the world map. Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, this array is always empty.This object contains the following fields:

  • dir (String) : A single lowercase character tipping on the level location (north, south, west, east).
  • levelIid (String)  : Neighbour Instance Identifier._
  • levelUid (Int) : WARNING: this deprecated value will be removed completely on version 1.2.0+ ** Replaced by: levelIid_**_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions