It's been and while. I forgot how to check array at -1,0 1,0 0,-1 0,1 with one loop?
I was using sin and cos but can't get it right. I need to test neighbouring tiles at 0, 90, 180 and 270 deg from the central tile. Help appreciated!
You mean something like this?
Repeat 4 times
— dx= round(cos(loopindex*90))
— dy= round(sin(loopindex*90))
Develop games in your browser. Powerful, performant & highly capable.
You mean something like this? Repeat 4 times — dx= round(cos(loopindex*90)) — dy= round(sin(loopindex*90))
Yeah, I'll try that. Thanks.
Had nearly the same one but without round that's why it wasn't working.