Random formation change

Get help using Construct 2

Post » Sun Jan 13, 2013 10:30 pm

I'm having some trouble getting enemies that are created by the system to be destroyed. Basically what I'm trying to do is have a platform full of enemies in a random formation when a button is pressed. I have provided a capx below of what I have tried.

What I want:
When spacebar is pressed the formation of the previous enemies on the platform are destroyed, and the same set of enemies are respawned but in fewer numbers and at different positions.

Here's a capx of what I have tried to do: ***Change group "destroy" to activated and it should allow you to destroy the enemies.

https://www.dropbox.com/s/ppel5eommt7n9pi/spawnsoldier.capx

I tried to make it so when the user presses "M" the enemies are destroyed but that didn't seem to work either.
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Mon Jan 14, 2013 11:52 pm

You're trying to deactivate groups that don't exist (formation1 and formation2).

At the end of the Destroy group, add a blank sub event and set group destroy deactivated. At the moment, the destroy group is activated then it's left running every tick. The blank sub event with the deactivate action will execute the events in the group once, then deactivate it.

Is that what the problem is?
B
15
S
5
G
7
Posts: 877
Reputation: 5,650


Return to How do I....?

Who is online

Users browsing this forum: Khamsou, Yahoo [Bot] and 17 guests