How do I have the same enemy type shoot independently

Just started using Construct 2? Post your questions here

Post » Sun Oct 29, 2017 5:07 am

I am trying to make the same enemy type behave differently from one another and shoot at different times.

Right now I have an event for the enemy to shoot every random(x) seconds but they all shoot at the exact same time which is not ideal.

I tried having the system pick a random instance but this just results in them taking turns shooting which is also not ideal. Any ideas are appreciated.
B
13
S
7
Posts: 34
Reputation: 1,717

Post » Sun Oct 29, 2017 5:12 am

Add Timer behavior to your Enemies and use it instead.

On start of the layout - For all enemies start "shoot" timer for random(x) seconds (Once)
On "shoot" timer event -> shoot weapon and schedule new "shoot" timer.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
126
Posts: 1,753
Reputation: 67,327

Post » Sun Oct 29, 2017 5:32 am

An elegant solution, thanks again dop2000.
B
13
S
7
Posts: 34
Reputation: 1,717


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests