How do I make enemies shoot whenever they want?

Get help using Construct 2

Post » Thu Jul 28, 2016 10:13 am

Message: APalFromHawaii can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
http://imgur.com/a/GgWrp
Here i have three enemies.
I want them to shoot whenever they want aka randomly.. but how?
In my previous games i used 'Every X milliseconds -> trigger once -> sprite spawn object'
But that way they all will shoot at the same time. I don't need that.
Please help!
B
3
Posts: 6
Reputation: 187

Post » Thu Jul 28, 2016 10:39 am

you can use

for each enemy
every random(5,10) seconds = random between 5 to 10 seconds.

just set how often and it will pick a random number between those?

i think that could work.
Follow my progress on Twitter
or in this thread Archer Devlog
B
49
S
22
G
19
Posts: 1,135
Reputation: 14,812

Post » Thu Jul 28, 2016 10:46 am

tunepunk wrote:you can use

for each enemy
every random(5,10) seconds = random between 5 to 10 seconds.

just set how often and it will pick a random number between those?

i think that could work.

can i do this in construct classic?
B
3
Posts: 6
Reputation: 187

Post » Thu Jul 28, 2016 12:23 pm

I have no idea, I never used construct classic.
Follow my progress on Twitter
or in this thread Archer Devlog
B
49
S
22
G
19
Posts: 1,135
Reputation: 14,812

Post » Thu Jul 28, 2016 1:30 pm

I would suggest to avoid loops whenever it is possible. Instead you can use Timer behaviour + random function as @tunepunk suggested.
ImageImageImage
B
45
S
23
G
89
Posts: 1,100
Reputation: 50,611


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests