[Solved] For each instance of an object

Can the player collide with more than one furnance at a time? Maybe multiple furnances are being increased. IDK, I don’t see anything. Do any other events change the object variables.

Yes it can collide with multiple furnaces at a time

i don’t know what you mean

and no any other event is not using the furnace object variable

Collision conditions pick every object that it’s in collision with. If the player is touching 2 furnaces, it could increase or change the variables of both furnances. I was just wondering if that could be happening. It would increase both object variables but only increase the global variable once.

In cases when I only want to interact with one object at a time I usually add pick object closest to either the player x, y or the cursor x, y depending on the situation.

If you wanted both objects to change then you can put the action inside a for each object subevent or instead of adding 1 to the global variable it would be the **number of picked objects **

I don’t know if that’s your problem but it could be an issue.


I tried but still not working and no i placed the object far away from each other so no chances of collision

Yes, that event. Where are the events that display that symbol over the jar? Did you or could you post that? I don’t see anything wrong in those 2 screenshot.

I tried this for the furnace and the jar one is here

OK. I see where you change the animation. Is there just one oreselection or does each jar have one?

I changed the method and it is working now
Sorry for bothering you so much
Thank you very much for your time

1 Like

You’re welcome. I’m just glad it’s working. Good luck.

1 Like

Could you give a brief post of what you did to fix it, so if anyone else has the same issue there is a documented solution?

I just changed the whole method and switched it to the same method as the Jar
As the image above shows
So everything should be done by one button and using object variable is the better choice instead of scene/global variable.

1 Like