I am trying to make an object pick a random number from 1 to 3 and going to on top of the corresponding object (objects being LeftUpSpot, LeftMiddleSpot and LeftDownSpot). After that it waits three seconds and goes back to the spot it started from and repeate.
Object should be smoothly moving to the spots by using tweens and random logic.
Object starts to stutter and wiggle around and seems to only go to the middle spot (so LeftMiddleSpot object and number two on the randomizer) then goes smoothly back to the original spot (LeftDefaultSpot).
I’m following the tutorial for boss fights in the GDevelop YouTube channel.
Screenshot of the code logic I’m using.
Circle sprites are the spots (LeftUpSpot, LeftMiddleSpot, LeftDownSpot and LeftDefaultSpot (the one on the top middle)). White square on the top is LeftHand object that is supposed to be moving smoothly. Other objects can be ignored. Ratmech object is hidden because I don’t want to show the final boss of my game.