You mean the route editor? Its interface may be very simple like: on "A" key pressed create a waypoint sprite under mouse cursor, on "D" key destroy a waypoint sprite under mouse cursor. And the sprites have drag&drop behavior, so you can move them.
Then press a button to export all waypoint sprites to a string of coordinates. The resulting string may look like this, each pair of numbers representing waypoint X and Y:
100,100;120,200;200,120;300,300
Or it can be a JSON array:
[{"x":100,"y":100}, {"x":120,"y":200}, {"x":200,"y":120}, {"x":300,"y":300}]
Then in your main project you need to parse these strings or split them using tokenat() to extract these coordinates.
Hi, I am creating my movement system. The movements I need horizontal, vertical and obligual.
I have created a grid with tilemap and each tile is 16x16 px.
I am now asking two things:
- How do I know which tile I have clicked?
- How do I colour a tile differently when I mouse over it?
By doing this I make a long vertical line, a horizontal line and an obligatory line appear on the clicked tile so it is easier for me to create the movements.
Eventually I will make the code available to everyone.
I'm a beginner and I'm eager to learn.
Thank you all