How do I create a menu with buttons over a sprite?

Get help using Construct 2

Post » Mon Sep 19, 2016 11:59 am

Hi friends! I have a question, i need for my game one thing... I want that when i click twice on an object appear two buttons over the object. One of this buttons is for upgrade the object and the other to erase or move ... That it's possible? Thanks! :D :D
Posts: 9
Reputation: 220

Post » Mon Sep 19, 2016 12:43 pm

Have a hud layer and have the two buttons, set it to invisible. Have the sprites with the scroll to behaviour and a booleon.

On double click sprite, set scroll to behaviour enabled, the booleon to true, and set hud layer visible.
This should zoom onto the chosen sprite, and the hud (set it to 0,0 for the paralax) should have the buttons open next to the sprite.

Then on click button, pick the sprite where the booleon is true, and either upgrade it's variables, or destroy it

Alternatively, you could spawn buttons at position sprite.x+40,sprite.y
And spawn the other at sprite.x-40,sprite.y
You would still need a booleon. The first option just saves you from destroying buttons.
Posts: 113
Reputation: 1,009

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests