• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android Urgent help PLEASE !!!!!

Y

yarak

Guest
My problem is this:

There is an object.I produce objects on the same layer.If the object I produce is colliding with the enemy object and if I have new objects I produce, it must be arranged at a certain distance behind the object I originally produced.That is, the first object keeps the distance when moving, or it keeps stopping again. In the meantime, the movement on the map is only on the x-axis, ie right or left.Happy if you help. THANK YOU...:)
 
N

NeonBits

Guest
If what you want is your object to stop in front another object, someone has once suggested to me something like:
if !( collision_line( x, y, x - 100, y, "object", false, true ) )
{x -= 3}
if the calling instance doesn't collide with "object" on its left side and at a distance going to one hundred max, it will move by 3 to the left. Which means, if "object" is in range, the calling instance will stop moving.
 
Top