Makkeonmies
Member
So in my game, a bullet object should pass through enemy objects. it should flash (the bullet) when it passes thru an enemy. however, if i add a collision event between the bullet and an enemy object for either one, they both freeze in their place (stop moving). the collision event can contain anything: a sound plays, the enemy hp drops by 1, anything; it always produces the same result: both objects stop in place upon collision.
if i remove the collision event, it works and the bullet continues flying through, otherwise never, even if the collision event doesn't have an action to stop the objects, or anything related to speed for that matter.
bullet obj is not solid but enemy objects are solid.
enemy movement code looked clean to me:
theres nothing else relevant in the enemy movement code, only that it only moves after the player if a playerpar object exists, and if the playerpar is a certain distance from the enemy.
Does the code look ok? I even checked in the Scripts all the events in the game where these related two objects are named, and found nothing out of the ordinary.
are there any conditions where smth like this can happen?
Can it be a bug? I've noticed the game messing stuff up sometimes if I dont periodically clear the compile cache.
Anyhoo, I found a sort of workaround to this problem, but it bugs me, so i'll keep on scouring through all possible events, maybe there's smth that I missed.
if i remove the collision event, it works and the bullet continues flying through, otherwise never, even if the collision event doesn't have an action to stop the objects, or anything related to speed for that matter.
bullet obj is not solid but enemy objects are solid.
enemy movement code looked clean to me:
GML:
near=instance_nearest(x,y,playerpar)
image_angle=point_direction(x,y,near.x,near.y)
mp_potential_step(near.x,near.y,spd,0)
Does the code look ok? I even checked in the Scripts all the events in the game where these related two objects are named, and found nothing out of the ordinary.
are there any conditions where smth like this can happen?
Can it be a bug? I've noticed the game messing stuff up sometimes if I dont periodically clear the compile cache.
Anyhoo, I found a sort of workaround to this problem, but it bugs me, so i'll keep on scouring through all possible events, maybe there's smth that I missed.