How do I multiple targets

Get help using Construct 2

Post » Mon Jul 18, 2016 7:04 pm

Hello guys,
I trying to make a 'spaceship game'. After I choose the targets (click on weapon then click on enemys) , I wana all weapons shoot all same time, but, they are shooting one per time. Anybody can helpme to solve this?

capx
https://dl.dropboxusercontent.com/u/206 ... -test.capx

Thank someone for advice or a suggestion.
B
24
S
4
G
2
Posts: 96
Reputation: 2,467

Post » Tue Jul 19, 2016 9:16 am

You are having a single variable keeping a single UID.
In that case, only a single instance of a weapon is picked.

Either keep the UID for the "selected weapons" in an array, or use some boolean variable of sorts.
This way in the shooting event, you can pick each weapon instance one after the other, according to the number of UIDs stored in your array.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Tue Jul 19, 2016 6:02 pm

I wanted after chosen the targets, each weapon attack your target at the same time. I do not know if I did, I change the "For Each weapon" for "Array" with the UID of each selected weapon that will attack?

Image

Image

Thank you and excuse my english
B
24
S
4
G
2
Posts: 96
Reputation: 2,467

Post » Wed Jul 20, 2016 10:58 am

An almost completely working example

Hopefully should be enough to put you on the correct tracks.
I've modified quite a lot, but left your original code and structure in, disabling it.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Sun Jul 24, 2016 2:23 am

Amazing, works. Thank You.
Now I try to make the weapons shoot ich one in your shooter area in the same time (despite no idea how, haha)

Thaks a lot =)
B
24
S
4
G
2
Posts: 96
Reputation: 2,467


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983, KTML5, Yahoo [Bot] and 3 guests