for 4. you could use your own stack
create an array, name it stack, give it the size 0,1,1
save your function parameter by doing stack.push(back, value, on X-axis)
after your wait action you do a
set object.angle to stack.front
stack: pop front value.