Hello all,

I was able to figure it out. I had to write a separate function and call it in the action code.

function rotate_left()
{ var new_angle = my.pan + 90;
while (my.pan < new_angle)
{my.pan += 22.5;
wait(1);
{
}

Then within the action...

if (key_a == 1)
{ while (key_a == 1)
{wait(1);}
rotate_left();
}