#Why does this object destroy ones that it isn't even touching?

13 messages · Page 1 of 1 (latest)

vestal field
#

I've provided a video and code. obj_ray is supposed to only destroy the instances of obj_enemy parent that it touches, but for some reason it destroys ones that it isn't

oak hedge
#

where is the part of your code that does instance_destroy?

#

I don't see that function anywhere'

vestal field
#

These are both part of obj_enemy parent. I guess the problem was that the ray is taking hp away from enemies it wasn't touching, but I'm not sure why

rain violet
#

oof. PLEASE tabulate your code. haha

vestal field
vestal field
oak hedge
# vestal field

the main thing I was confused on was I did not specifically see instance_destroy() anywhere
I see that is were health is reduced but I don't see where it does 'ok health is 0, yeet me from existence'

vestal field
#

oh my bad. it's here, in the step event of the obj_enemyParent

vestal field
#

i've figured out that the reason this glitch happens is that obj_enemyParent thinks that it is touching obj_ray (which is a child of obj_bulletParent), even though it isn't

#

im not sure why that is