Tower Defense UI

Get help using Construct 2

Post » Sat Aug 31, 2013 12:08 am

Hi, im very new to this whole developing thing. But i decided to make a tower defense game as my first one. I have all the turret and enemy behavior stuff pinned down. But i cant figure out how to create a UI/HUD from where i can buy my towers and such. At the moment the only way i can put down towers is by clicking the wall surrounding the path (as shown in the tutorial). Any ideas on what i should do?
B
9
S
2
G
2
Posts: 18
Reputation: 1,415

Post » Sat Aug 31, 2013 12:17 am

Id also like help with how to then drag the towers from the UI to the wall and then set them down there and still making sure that they can only be put down on the wall.
B
9
S
2
G
2
Posts: 18
Reputation: 1,415

Post » Sat Aug 31, 2013 5:00 am

You could purchase a tower then change the mouse cursor to be the tower image and then have it appear red where you can't place it and then green where you can place it and then stamp it. Kinda like a rollercoaster tycoon type thing.

If you want to drag the towers from the UI, just give the towers drag&drop behaviour that becomes enabled when they have been purchased. Then you could drag them into the level and set up some logic to snap them to nearest available wall.
B
47
S
18
G
84
Posts: 2,266
Reputation: 49,786

Post » Sat Aug 31, 2013 9:27 am

Or when you drop them, have the dropped tower snap back to the store, and read the mouse location like it was a click on the wall.

You can make a draggable window for your HUD, put all the parts in 1 or two families and pin the families to the draggable background image of the window. (the background can be in the family too.)
Set an event
Not touching dragbar | drop Windowbackground.

That way it can't be dragged if they aren't using the dragbar. (which could be the title font.) Which would keep it from interfering when you drag items out of the window.
B
241
S
63
G
33
Posts: 903
Reputation: 40,729

Post » Sat Aug 31, 2013 11:45 am

Thanks for the ideas! Any clue on how i should set up the events for this? Like i said, im very new :)
B
9
S
2
G
2
Posts: 18
Reputation: 1,415


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, Construct Monkey, Yahoo [Bot] and 9 guests