So essentially want to have a button rotate to 180 degrees, then stop. Then after user supplies the stimulus, the button continues going clockwise to the 360 degree mark, rinse and repeat. BUT I would like the button to only spin clockwise. Currently I had it as 180, 360, 180 but this last step makes it rotate counter-clockwise (b/c it’s traveling to the 180 degree mark and not the 540 degree mark). So next logical step is to make it add 180 degrees to it’s current rotational orientation, only problem is that I don’t know how to pull the rotational value from the transition.to statement. Perhaps there is even an easier method to dictate that I only want clockwise rotation? That would be obviously preferred. Here’s what I was working with before I ran into an error saying, “attempt to index field ‘to’ (a function value)”
Thanks!
[lua]
local rotationalAngle = 0
local function rotateFunction()
transition.to( upInfoArrow, {time = 1500, rotation = rotationalAngle + 180} ) – rotating the up arrow into down arrow
rotationalAngle = transition.to.rotation – ** error is here
end
[/lua]