I need help

L

LegionZ_Gaming

Guest
So I’m trying to make it so that the same object will go toward the other object if it collides with the drawn circle
Also the problem is that it keeps going toward itself
 
collision_circle does not return true or false. It returns the instance ID of a colliding instance or the keyword "noone". (In general, I recommend checking the offending function of an issue you're having in the manual: https://docs.yoyogames.com/source/d...d collisions/collisions/collision_circle.html)

So, I'm not actually sure what you're trying to do. But you should end up with a check that looks more like this:

if collision_circle(...) != noone or collision_circle(...) == noone.

In addition, I'll point out that in some cases, you might only need to do a distance check, (like, point_distance) to define a circular radius. You might need the collisions in your system, (once again, I can't tell exactly what you're trying to do), but just in case, I'll mention that.
 
L

LegionZ_Gaming

Guest
Ok thx for the help it didn’t work but I’ll try to find some way else to do it
 
L

LegionZ_Gaming

Guest
collision_circle does not return true or false. It returns the instance ID of a colliding instance or the keyword "noone". (In general, I recommend checking the offending function of an issue you're having in the manual:

So, I'm not actually sure what you're trying to do. But you should end up with a check that looks more like this:

if collision_circle(...) != noone or collision_circle(...) == noone.

In addition, I'll point out that in some cases, you might only need to do a distance check, (like, point_distance) to define a circular radius. You might need the collisions in your system, (once again, I can't tell exactly what you're trying to do), but just in case, I'll mention that.
I still can’t figure it out but I’m trying to make 2 planets move towards each other once in the gravity field of the other whitxh they r both the same instance because I’m going to have them applie a random sprite onto them
 
Top