[SOLVED]Collision not detected

in this pong-magic themed game, with the spell duplicate activated the ball should hit the shield and create another instance of the ball, but somehow the collision is not detected and the spell does not work.

Sem título

the main problem is this non-detected collision here

more info:

  • already checked collision masks, they’re seem good
  • the ball doesn’t use bounce behavior
  • there isn’t another instance of the shield when the spell is activated
  • the shield and others objects take part of Bounce_off_group

Does the text object “debug” have “activado” in it? I suggest you set it to “” when you toggle mage2.magic3_duplicator, to confirm it’s not left over text.

the porpuse of debug is only for debbuging, I don’t know if it affects in something, but just for curiosity, I also tried without it, and still no working

is there a tool which I could identify the objects the ball are touching?

maybe put it along side the trigger once or put action next to it

you meant like some of these?


My purpose of asking if the text object has the phrase “activado” in it is to make sure the game is getting to that event and the conditions are met.

If you want to know if some conditions are met, put in something that indicates it. It can be a text of a text object, a console output message, a sprite or the background changing colour. Anything, as long as it is unique and only happens if the conditions are met.

In your case, if the text does not appear, then it means the conditions aren’t met. That’s what I’m trying to ascertain, how far along the subevent the program goes before the conditions aren’t met.

got you better now, and yeah, the debug displays activated, I already put it on others action places to check, but the only one which does not meet the condition is the collision. Don’t know why yet.

Just a thought - do you have physics behaviour enabled on the ball and shield?

The events you posted in the first post, are they subevents of any other events? Maybe they’re intefering.

If I’m not sure if objects are picked I’ll put the action to rotate an object or change it’s tint in an event without conditions right before the event in question. It gives a nice visual as to whether a previous condition is filtering out an object.

none of them have it

Ok, are the 2 objects on the same layer?

And as @Keith_1357 pointed out, there appears to be a parent event for the multiplicar event group. What is it?

@MrMen yes, they are in Base Layer


@Keith_1357

about the idea of tinting, seems fun, but I already debbuged through texts each main and sub events.

Those events are a sub-event of the button click
The collision and variable checks should probably be on its own line. As is you would need to click the button on the same exact frame as the collision

2 Likes

YOU WERE RIGHT! that was exatly the problem.

Is now working just as espected, THANK YOU SO MUCH <3

1 Like