Something going slowly to another object



I'm making a game (stop reading if you don't want spoilers) where you needs to swipe stuff away from a pixel to keep the pixel from eating it. But, I want the things going towards the pixel to, well, go step by step moving to the pixel's position. How is this possible? Thank you for reading and please explain. Here is a screenshot if you don't understand:


Use change x, y for moving it closer but have the x and y number low.


use a set speed and do this
change whatever your using to move it and say ____ 2 wait 100 ml inside a repeat ___


if you don't want to use trig:

if (pixel X)>(food X)
change (food X) by -1
change (food X) by 1
if (pixel y)>(food y)
change (food y) by -1
change (food Y) by 1

if you do want to use trig:

insert trig here


Yeah you might have to use set speed like @SnowGirl_Studios said.


@justanerd screenshots please. I am better that way.


can you pls give credit to me in the game :grinning:
I recently realized that 84% of hopscotches don't even know who I am :confused:



@justanerd thank you. You are very helpful. I will try this.


@justanerd I WORKS!!! You are awesome! One question: do you increase the number to make it go faster? (Like instead 2 and -2, 3 and -3?) would that still work?


Yes it would still work, it would still work because it is moving at a faster pace, the amount of times it moves.


Second question:

(If you are wondering, I added an extra Check Once If to make it with the game, but for now, the value is always 0 so it is like the Check Once If is not there.)


The rules on the side that you circled is that you have to invert the change x/y' block to be positive numbers.


@Phase_Studios do you mean like this?

Because when it's like that it goes a different way but still the wrong way....


yes, I changed from 1 to 2 to make it faster because 1 was super slow, but yeah, higher numbers=faster, but don't go past 10 w/out setting speed to 99999999999... otherwise it will be chunky


You are right, it gets weird looking, I am making a game that has this kind of stuff with this.


and of course, if you're in 276th grade math you can use trig to make it move in the exact right direction and it won't look quite as bad, but I'm in 8th grade... so I don't know anything about sine and cosine and the hypotenuse or all those other big trigonometry words, I can work with algebra though :grinning: which sadly does nothing in this case, but I am trying my best to self teach myself trigonometry to make a raycaster engine... but it's not working to well


I am teaching myself trigonometry, it is hard. I am in 6th grade I think we learn this in high school or something.


I still need an answer because @Phase_Studios's answer didn't work :cry:


I'm in 8th grade too. (20202020)