How do I Drag Spawned Objects?

Just started using Construct 2? Post your questions here

Post » Tue Aug 30, 2016 2:35 am

Hello, I'm new to Construct 2 and I need help making a tower defense game. I like the method of tower spawning in "Bloons Tower Defense" but I can't quite figure out how to make that happen. I would like to be able to touch and drag the tower into place. If the tower is over somewhere it shouldn't be placed (such as the "track"), the tower will have a red tint and will be destroyed when the "touch" is released.

I'll appreciate any help! :D
B
8
S
2
Posts: 13
Reputation: 506

Post » Tue Aug 30, 2016 2:53 am

This premade behaviour should be what you're after https://www.scirra.com/manual/137/drag-drop
For the red tint you can do on dragging, if overlapping track then change to red tint.
For the destroy you can have logic such as on drop, if tower is overlapping track object then destroy.
B
45
S
15
G
73
Posts: 2,007
Reputation: 43,396

Post » Tue Aug 30, 2016 3:02 am

use container on tower ..
on tint Sprite make 2 circle Black Color , red color ans use it on frame 0 and 1 and make sprite opacity 60

and when tower is overlapping with correct place set frame 0
else Tint set frame 1....
B
15
S
7
G
7
Posts: 201
Reputation: 5,277

Post » Tue Aug 30, 2016 4:22 am

B
15
S
7
G
7
Posts: 201
Reputation: 5,277

Post » Tue Aug 30, 2016 11:53 pm

Message: Yaywaffles95 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
CBelle wrote:is thats you need?

https://drive.google.com/file/d/0B8mc-_g50xBlQndxeXBIakdKS1U/view?usp=sharing


That's EXACTLY what I need! Thank you both for your help and quick replies! :D
B
8
S
2
Posts: 13
Reputation: 506


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests