I have 10 icons with inst variable. obj_icon with click event
I have 10 other icons with the same inst variable. obj_icon2 with draggable
I have 10 other icons with the same inst variable. checkmark to show result.
I have a text to show the value of checkIconNum to make sure it is correct.
On the click event, I have a global variable that is set the the obj_icon instance variable and then this icon is destroyed to eliminate the click event.
On the drop event of the second icon, I have this code.
My problem is that there is no consistency. the 2 first chosen icons work as expected and then the following ones sometime work correctly, sometimes the wrong icon is detroyed.
Could anyone tell me what I am doing wrong?
Develop games in your browser. Powerful, performant & highly capable.
Did you set the instance for both objects? You should give them the same instance to check them.
What I see is you setting the instance of the icon to a variable, but where is the obj_check instance being set?
i have the same instances for all the icons from 0 to 9 set in the UI. I gave them the same name inst_ID
so I have: