Hi all,
I’m currently working on a game ‘Magnet Monsters’ please see link to tweet to see the demo of the game so far.
https://twitter.com/playhousegamer/status/1215953580131266560
There are 2 boards moving across the screen at the same time using transition.to. When you move between the boards they stop and start again when you land. The transition.to starts again so if you’re very close to the edge it still uses up the 1000 to only go a short distance which doesn’t make for great gameplay!
Is there a way to always make the boards move at the same speed even after they’ve stopped and started again? I was thinking of using the system time but am not sure how to do this. All help appreciated. Transition.to code below.
function moveTopBlock() topblock.transition = transition.to(topblock,{time = 1000,x = \_CW-topblock.width/2, onComplete = trans2}) end trans2 = function () topblock.transition = transition.to(topblock,{time = 1000,x = 0+topblock.width/2, onComplete = moveTopBlock}) end
I’ve also attached the .mov but not sure if that uploads so have included link.
Many thanks
Matt