How do I sell a tower without destroying the others

0 favourites
  • 5 posts
From the Asset Store
Tower stacker
$9.99 USD
Template for a tower stacker game, fully documented in comments and video
  • How to sell a tower without destroying the other of the same type.

    I have a game on Tower Defence format, I am facing problem in time to sell only one that is on the scene, when I try to sell only one all are sold and destroyed. It turns out it's not what I want, I want to sell and destroy just that I selected.

  • Anyone?

  • Create a GLOBAL VAR (sellTower)

    On touch/click tower, sellTower = tower.UID

    Pick element by UID (sellTower)


  • when you click on the tower assigns the value of weapon 1.UID to selltower.

    When click on the image to sell and next to esteusa pick by comparision

    if weapon1.UID if set to selltower. then it triggers:

    Destroy weapon1 and add 25 of money

    no debug saw so are assigning the value of UIDs for however selltower

    in time to catch the individual still object so is destroying everyone.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, thank you [quote:h9sdavvv]moebios

    , i was found where the error was because I had already implemented the code another instance to sell the towers, but the wrong way, now found and fix all beauty, worked perfect thank you for helping me.

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