How do I upgrade a tower

0 favourites
  • 2 posts
From the Asset Store
C3 Swipe Towers is the game of speed and reflexes by enabling climber reach the top of tower.
  • So I have been at this for about a week and I can't come up with anything so if anyone could help me it would be greatly appreciated. I need to be able to select a tower and spawn another object that I can select and upgrade that towers stats or I could select a button at the top of my screen that will upgrade a specific tower's stats. I am fine with either but I would prefer the first one. Everything I have tried seems to be failing. I have tried on touch of spawned object and money is > cost spawn object and it will not spawn at all. I also have the problem where when I touch the spawned tower it deletes the previous tower and takes the amount of the tower away from my money. Any help would be greatly appreciated to stop these things cause I have no idea what else to do. Below is what I have for a tower so far. Thanks again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have yet to work with turrets so maybe someone more knowledgeable will be able to help you out, but I could think of a way to help you out a bit.

    I would recommend using a variable when the player selects a tower, so that the player can only select one tower at a time.

    On Touched Gunner1

    VarGunner = 0

    {VarGunner set to 1

    Create (your sprites for the upgrades) at Gunner1.x, Gunner1.y} (Any location you want)

    On Touched UpgradeButton

    VarGunner = 1

    Subconditions:

    Money > YourTowerUpgradeCost

    {Create (upgraded tower) at Gunner1.x, Gunner1.y

    Destroy Gunner1

    Money variable - YourTowerUpgradeCost}

    Money < YourTowerUpgradeCost

    MoneySprite flash for 1 second (Just an indication to let the player know that they don't have enough money to upgrade)

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