check reference video
https://www.awesomescreenshot.com/video/41931017?key=f408e3dcf4e8bf4892c499a3c0d02956
There's probably an easier and more efficient way, but here's my attempt:
dropbox.com/scl/fi/7mzkocw8vmpv94d58t8kg/drawLShapeLine.c3p
i look your attempt was, little hard to me
but what if when want to create 3rd line continues
i tweak the code , disabling else and create one more line with firstLineVertical is = 2. but line cant be created.
Develop games in your browser. Powerful, performant & highly capable.
Then it won't be L-shaped! You should've explained your task better. For multiple lines the solution would be different. If you just want to connect dots, then simply create a new line from dot to dot as the mouse moves.