Crank to Attack

Hey all, longtime reader, first time poster.

I’m trying to implement a basic crank to attack function in my game, but can’t seem to get the crank to register.

The attack works fine as an “on confirm do” but if I use the same code with an “on crank do”- nothing happens. I even recently tried it with adding the event.ra conditional but still no luck getting it to register.

When I try to test the crank registration at all with a simple “on crank do; say “cranking”” it works.

Any ideas?

1 Like

I am not quite sure without the attack information, but it may be you need to setup something that attacks every 45 degrees, I can show you an example:

on crank do
crank_angle += event.ra
if crank_angle>=45 then
crank_angle = 0