I can't fix it with my plugin because I don't know why Construct behaves this way. Have you considered reporting this as a bug here github.com/Scirra/Construct-3-bugs/issues It's frustrating and it shouldn't be like this.
In your case I'd recommend to change the logic behind destroying the instances that you click. When you click a Family instance, instead of Destroying it right away, call a function that destroys it. Pass an instance's UID to the function. In the function pick an instance with this UID and destroy it. I checked, it works. But. It will not destroy the topmost instance but the lower one. Again, not a bug in my plugin but a way Construct treats touching several instances of the same object type.
My condolences.
Actually, you don't even need to have TouchPlus plugin in the project to witness that. Create a new project, add Sprite, Browser and Touch. Put two instances of the sprite to the layout so they overlap. Then add events:
"On touched Sprite" →
Browser: Log in console Sprite.UID
Sprite: Destroy
Launch the project and click where two instances of the sprite overlap. Both of them will desappear. See the console: only one UID is printed.
Ok, I've investigated it and you're not gonna like what I'm gonna say))
Here's the thing.
What you see is not a bug in the TouchPlus plugin. It is a peculiarity of how Destroy action works in Construct when it gets the instances from a Touch condition when it comes to instances of the same object type. In your case you have ovelapping instances of the same object type "DropRecursos" (yes, it's a family but in this regard it is treated like an object type).
You can check it by printing the instance's UID before the "Destroy" action and you'll see taht only one UID gets printed before both instances dissapear.
Thanks!
Yes, thanks for the video. I can see what you're talking about. Still, can you share the project file? Best if you can leave the minimum of objects, layouts and logic enough for the bug to persist
Can't reproduce. Can you send me the project file?
Fixed it in v.1.1.6
On it! ⚙️🔧
Fixed in v.1.1.5, cheers!
Thanks for the report. Working on it
Ok, I figured it out. It's not families, it's event variables. Fixed it in v.1.1.4
Thanks to your report I also found a similar bug with script blocks. Fixed in v.1.1.2
Sent you a quick fix in discord. Can you try this out and see if it works for you?
Thanks! Looking into it. So far I can tell that the problem is the built-in function call.
Sure! Send me this
Member since 7 Aug, 2016