Which object is the collision event defined in? Which collision event is it? How did you define the bounding boxes for the sprites for both objects? Are you using the default Draw event, or have you defined it in some other way?
The object (I wrote SimpleBrain above and made a mistake. I meant BigBrainObject.
The BigBrainObject is in the collision event of the object DraculaCastleObject.
The bounding boxes for the castle is: Fulll Image and Precise for Frame.
The bounding boxes for the BigBrainObject is: Automatic with Rectangle.
No. The objects are created in the room, spawned by a controller. I'm not using GML to detect the collision, I'm using the built in event.
my guess is you have multiple walking brains all using the same global so it seems like nothing is happening because all the objects are arguing over what the global hp actually is
I think this might be right....not sure though. I have 5 basic brains. One of them the collision works on, the other 4 it doesn't. Always. It wouldn't have that same behavior if the problem was that
they arguing on which global to use. Not to mention, and this is the important part, there is only one using that global hp. That's for the castle and there is never more than one castle. Also,
my brains have their own hp.
global.castle_hp -= 200
Ok. I'm convinced its nothing to do with the GML. But I will try and use GML for the collision detection as well and see if that works.
That's the only line of code that is executed in that event. Now there is another event, in the DraculaCastleObject that defines what happens when the castle is damaged, but that's not all of the problem
since that line, the
global.castle_hp -= 200
never executes. I know that because the debug message never executes.
GML:
show_debug_message("BigBrainObject in DraculasCastleObject")
global.castle_hp -= 200