Making multiple enemies shoot.

Get help using Construct 2

Post » Thu Jun 07, 2012 2:53 pm

I have an issue on Construct 2.
I have an enemy with a script that tells him to shoot when I see him on screen every 1 second. There is a problem. When i spawn multiple enemies at time, only one of them shoots. I already tried to make a condition to pick all of MSFGuy (enemy instance name), doesnt help.

Any ideas?
B
1
Posts: 2
Reputation: 281

Post » Thu Jun 07, 2012 3:01 pm

Use a "For each MSFGuy" condition instead of a "Pick all" probably.

Also post your capx if you need further help.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Thu Jun 07, 2012 3:03 pm

Ok, will try.
B
1
Posts: 2
Reputation: 281

Post » Thu Jun 07, 2012 3:09 pm

It's somehow the same problem mentionned in this topic. And the solution is the same !

Add an instance variable to your MSFGuy. In a "For each", increment the new instance variable by the time delta (the variable "dt" under system->time). Once it reaches 1, set it to 0 and make your MSFGuy shoot.
B
46
S
17
G
18
Posts: 847
Reputation: 13,802

Post » Thu Jun 07, 2012 5:05 pm

Hi!

I used R0J0hound's method on the mentionned topic and it works perfectly.

My script :
Canapin2012-06-07 17:16:16
B
5
S
1
Posts: 34
Reputation: 1,026


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests