Im trying to learn how functions work but,,assumming the following code
sync on
sync rate 60
backdrop on
make object cube 1,1
do
rotate object 1,wrapvalue(x),0,0
inc x,1
sync
loop
things work just fine, the object is rotaded as the loop goes on, but why when i put that code inside a function it stops working?
sync on
sync rate 60
backdrop on
make object cube 1,1
do
rotate_object(1,1)
sync
loop
function rotate_object(n,x)
rotate object 1,wrapvalue(x),0,0
inc x,1
endfunction
What do i need to to in order to make it work? or is it just that functinos dont work that way? thanks