Ideally only switch costume when you know it needs to change or you're forcing a screen refresh every frame.when green flag clicked
point towards [mouse-pointer v]
switch costume to (round ((direction) / (45)))
set initial costume
work out costume number
if new number <> current costume then switch costume
Yes, i knew that, it is just a proof(the project) of concept.