Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hei!
Is there a way to get the coordinates of a object eg. my player on the canvas?
Lets say my canvas is 720x480 pixel. My player is standing on pixel 196,64 which would be top/left of the canvas.
How to get these values into the code?
Greetings!
let's say you want to set an some_object to the obj_player
add action > set position x=obj_Player.X y=obj_Player.Y
So you have a lot of options like setting a variable, ...
Use the system layer expressions. For example you can subtract viewportleft from player.x to get the player's position relative to the viewport.
https://www.scirra.com/manual/126/system-expressions
Develop games in your browser. Powerful, performant & highly capable.
+1
Thanks you! ViewPort was the keyword for me.