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
14
S
8
Posts: 35
Reputation: 1,844

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
19
S
9
G
158
Posts: 2,386
Reputation: 84,399

Post » Sun Oct 29, 2017 5:32 am

An elegant solution, thanks again dop2000.
B
14
S
8
Posts: 35
Reputation: 1,844


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests