How do I make only selected sprite option?

0 favourites
  • 2 posts
From the Asset Store
A set of retro 16-Bit Neon UI elements to make your menus pop!
  • I'm making a game that'll have options to upgrade, and in turn, earn more money. I thought it'd be easiest to make a sprite for every building, and different animations for each "upgrade". But if someone makes two of the same building, and then upgrades one, both sprites will change to the upgraded animation.

    My game has 36 spots for buildings, and the player can build whatever they want. Is there any way to make it so only the clicked sprite's animation changes?

    If this has been asked before, please forgive me and help me find the post. I, for the life of me, can't find this answer anywhere.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need a way to differentiate the two buildings. I'd recommend an instance variable for each spot or building. Then, when a building is clicked, you can tell which has been selected. Hopefully this simplistic example helps:

    There may also be a solution that uses the buildings UID's, but I don't have much experience there.

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