Skip to Main Content
Construct 3 suggestions 21H2 - ARCHIVED

This suggestions platform is now closed and will be shut down on March 1st 2024.

Please ensure any content you care about is backed up before that date.

Feature requests are now handled on GitHub here: https://github.com/Scirra/Construct-feature-requests

13 VOTE
Categories Runtime
Created by dop2000
Created on Oct 15, 2022

Please add Object.X(layer) and Object.Y(layer) expressions

Similar to Mouse.X(layer) or Touch.X("layerName"), these expressions will convert object coordinates to another layer.

This would be very useful for objects like a cursor sprite, which may be controlled with a gamepad or some other input method. To get its position on any layer we could use simple CursorSprite.X("layer") and CursorSprite.Y("layer") expressions instead of these monstrosities:


CanvasToLayerX("Layer2", LayerToCanvasX(CursorSprite.LayerNumber, CursorSprite.X, CursorSprite.Y), LayerToCanvasY(CursorSprite.LayerNumber, CursorSprite.X, CursorSprite.Y)

CanvasToLayerY("Layer2", LayerToCanvasX(CursorSprite.LayerNumber, CursorSprite.X, CursorSprite.Y), LayerToCanvasY(CursorSprite.LayerNumber, CursorSprite.X, CursorSprite.Y)


Another common example is when a character in a game picks up a coin and it flies towards a coin counter located on a HUD layer with zero parallax. Again, instead of those long expressions converting to canvas and back we could use:

Coin MoveTo CoinsText.X(Coin.layerNumber), CoinsText.Y(Coin.layerNumber)


  • Attach files
  • +8