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!
Develop games in your browser. Powerful, performant & highly capable.
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
+1
Thanks you! ViewPort was the keyword for me.