Drag/swipe multiple select

Get help using Construct 2

Post » Fri Mar 29, 2013 3:57 pm

I'm looking for a way to swipe across the screen and selected multiple enemies in the process. Similar to the way REZ works, where you hold down a button and move the joystick over the enemies to select them, then let go to to fire at all of them. Instead, with the touch event.

Any good examples of this working?

Thanks
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Fri Mar 29, 2013 4:23 pm

Pretty simple (I think)
1. Create a small circle or square "selector"
2. Set up the events:
"On click and every tick -> set selector to mouse"
and
"On selector overlap with enemies set animation to..."

Then you can reference the animation name to do damage or destroy

not sure how your game is setup but this should be able to be modified to meet your needs.
             
B
6
S
3
G
1
Posts: 102
Reputation: 1,379

Post » Fri Mar 29, 2013 4:28 pm

Duh. I don't know why I didn't think of using a sprite as a selector. Thanks!
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Fri Mar 29, 2013 4:52 pm

Here's a slightly different approach:

Demo
Capx
B
44
S
13
G
7
Posts: 338
Reputation: 10,379

Post » Fri Mar 29, 2013 5:27 pm

@ArcadeEd Yann did a tutorial type video on this on his youtube channel as well. You can find it here, though it does tend to wander a bit as he did it live while working out how to create a selector: Marquee Selection
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,413

Post » Sat Mar 30, 2013 12:47 am

Thanks everyone, all great examples!
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], Governador, RookieDev, tarek2, Thelegendvinny and 18 guests