Master Cabalist
Member
I'm trying to do a point in circle collision detection. The problem is simple. I just want to see if one of my bad guys is within a circle. I tried the collision circle detection function and the point in circle and there must be something I'm not doing because its not picking up the collision on either way.
if (inst4 != noone)
{
with (inst4)
{
floater = instance_create_depth(x+10, y-10, -1700, DamageIndicatorObject);
//hp_minus = irandom_range(5, 20);
//hp_minus = irandom_range(1,5);
hp_minus = irandom_range(1,5)
floater.text = string(hp_minus);
hp = hp - hp_minus;
hp -= 200;
}}
Should be simple, right?
Code:
var _x = x;
var _y = y;
Code:
with(BigBrainObject)
{
if (point_in_circle(x, y, _x, _y, 600))
{
inst4 = BigBrainObject
}
}
if (inst4 != noone)
{
with (inst4)
{
floater = instance_create_depth(x+10, y-10, -1700, DamageIndicatorObject);
//hp_minus = irandom_range(5, 20);
//hp_minus = irandom_range(1,5);
hp_minus = irandom_range(1,5)
floater.text = string(hp_minus);
hp = hp - hp_minus;
hp -= 200;
}}
Should be simple, right?