How do I do this one last thing

0 favourites
  • 5 posts
From the Asset Store
Show your master of martial arts by killing all flies empty handedly!!!
  • So my tower defense game is finally all coming together but there is still one last thing that I need as far as I know for my game engine to be complete. I can upgrade each individual tower but once the upgrade has hit my instance variable of 3 I want to hide the highlight for the tower that has been fully upgraded but it hides it for all of the towers. How can I make this work, how can I make it so each individual tower stop from upgrading after it has reached it's max upgrade. Any help would be greatly appreciated. I have attached a screen shot of my upgrade group. Thanks in advance.

  • Assuming event 91 is a top-level event (i.e. perhaps only in a group), it looks like you're adding 1 to highlight.maxUpgrade on all highlight objects in event 92, as none have been picked, it will pick them all. Just a stab in the dark.

    edit: unless you are using containers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • codah this is in a group, you are correct about that. I can't figure out how to add 1 to an individual instance of highlight. I have been trying to make it work for a few days now and I just can't seem to get it.

  • Event 95 is checking if ANY highlight objects have MaxUpgrade=3, it is not PICKING that one. Use 'Pick by comparison', instead, to pick that one.

  • I think event 95 is fine (C2 ensure picking is done by using the compare instance variable). And since you actually wanted the ones that have it to 3, it is not a problem.

    However, event 92 would not work well unless gunner1 and highlight were in the same container, which explain that everyone of the highlight actually increase their values.

    Since the highlight I think is proper to each instance of the tower, using containers seems logic to do

    Unless you are using families, in that case, you would have to link them using instance variables to store and pick by uid

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