All Questions

Community

Doureyd
posted to: Drawing the path

How to hide the starting arrow?

"If you don’t like the double arrow, you can draw a sprite on top of the starting cell to cover it up."

With what you are suggesting we won't see the underlying ground tileset, right?
Is there a way to hide the arrow but keep the ground tileset?

I wonder if there is a way to alter the arrow visibility with shaders?
Or maybe add a visual copy of the ground tileset on top of the arrow?

Thanks
  • Nathan Lovato replied
    Solution

    Yes, the idea is to put a sprite over the start cell that's big enough to hide the arrow.

    If you'd like, you can also:

    1. Draw the path
    2. Update the autotile (what we do in the tutorial)
    3. Remove the first cell without updating the autotile again

    The third step will remove the arrow.

    Now, you'll be left with a sharp end like this. If that's fine by you, all good. If you want to add a cap, you'll need extra code to add a sprite on the starting cell and rotate it based on the path's direction.


  • Doureyd replied

    Wow a one line solution, loving it thanks!
    As recommended I just added this line at the end of the arrow draw function :

    set_cellv(cell_start, -1)