can someone explain pick to me? Not working

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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:

    • obj_icon inst_ID 0 to 9
    • obj_icon2 inst_ID 0 to 9
    • obj_check inst_ID 0 to 9

    It seems like since I check these against the same variable, they should be the same. I could PM you a link to my file is your are willing to look at it. I am a beginner and things mystify me a little coming from javascript.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)