0 Favourites

Upgrading individual towers

  • Hi everyone!

    I ran into a problem with upgrading individual towers, as the title indicates.

    In my setup you can drag turrets on to the desired position. When using the mouse on object clicked, it doesn't target that specific tower clicked and i ran out of possible solutions to tackle this. So i somehow need to store the IID of the tower clicked, but i didn't find any option to do this.

    If i was programming let's say in Java I'd do something like this:

    ...

    onObjectClicked(){ return getID(this.object)}

    ...

    I found some really helpful posts on this forum, which sadly involved the solution beeing presented in a .capX file, which have been deleted by now.

    The FAQs about picking instances helped aswell, but I didn't find a possible solution to my specific problem.

    I appreciate your help!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • + on click

    • //object picked

    everything in your on click event has an reference to the clicked object, if you also want it outside, there are many ways to do that.

    You could save the UID of the clicked object in a variable.

    + on click Object

    • variabel FuFu = Object.UID
  • Thanks for your quick response, everything is working out now! Thanks a lot!

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