How do I create a menu from a point on the map

Get help using Construct 2

Post » Mon May 08, 2017 7:01 pm

I'm creating a tower defense game and am trying to spawn a tower select menu when the user touches a certain point on the map. After they touch the point, a menu spawns with all of the tower options that can also be touched to place that tower at that point. Does this functionality exist in Construct? I'm having trouble creating the logic to allow such a thing. I'm trying to create something similar to the below gif...
Image
B
3
Posts: 3
Reputation: 181

Post » Mon May 08, 2017 7:10 pm

Yes, and it's called the event sheet
Hint: On Touched Tower Object - Set position to Tower.x and Tower.y
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,481

Post » Mon May 08, 2017 8:05 pm

On Touched Tower Object - Set position to Tower.x and Tower.y


Using the image above as reference

I'm experiencing the same problem with a game I'm working on. The tough part is figuring out how to click on different places on the popup menu.

Can you have 1 sprite with the different buttons on it, and build a different tower depending on which one they click on, or do you have to spawn 4 objects relative to the towers location that have sprites that line up to appear like it's 1 object?
B
5
Posts: 4
Reputation: 233

Post » Tue May 09, 2017 12:35 pm

Whiteclaws wrote:Yes, and it's called the event sheet
Hint: On Touched Tower Object - Set position to Tower.x and Tower.y


That would allow me to open a menu, sure, but I need to be able to select a tower from the menu and place that tower on that point. I have the exact same question that @mikesnorth has.
B
3
Posts: 3
Reputation: 181

Post » Tue May 09, 2017 11:46 pm

Whatever suits you best or better is fine for you. Just have to watch performance.

This would be the direction that i would go.
At this moment simple, but as the tech tree grows, i will bring the whole tech tree in a lookup table.

https://www.dropbox.com/s/z8c31mkbj0yx0 ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed May 10, 2017 3:01 am

Do the tutorials, this is basic logic,
Spawn 4 objects with an instance variable that determines the frame (appearance) and the tower spawned
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,481


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests