Map To Room

Map To Room Node

The Map To Room Node takes input values X and Y that define a position in map coordinates and converts the position to the room coordinates of a specified Location.

This is particularly useful for positioning a room level object so that it is at a chosen position on the map, presuming the position is within the bounds of the location.

See Coordinate Systems for more information about how coordinate systems work in Kwyll and how to convert between the various systems in logic.


Ports

Location

A location reference port that provides a reference to the location that the resulting coordinates are relative to. If not connected, and the logic is on a location, the current location will be used.

X

An integer input port used to provide the X value of the map coordinate.

Y

An integer input port used to provide the Y value of the map coordinate.

X Out

An integer output port that provides the X value of the position in room coordinates.

Y Out

An integer output port that provides the Y value of the position in room coordinates.


Parameters

X

A constant integer value for the X coordinate, used when the X port is not connected.

Y

A constant integer value for the Y coordinate, used when the Y port is not connected.