How do I randomize my bullet spawn time?

Get help using Construct 2

Post » Sun Apr 27, 2014 8:53 pm

Hey guys, I was just wondering, how do I randomize the bullet spawn time? For example, if I would like to randomize the spawning time between 20 and 40 sec?

Image

Thanks,
guannstar (FNORD)
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Sun Apr 27, 2014 8:55 pm

Try "random(20,40)"
B
2
Posts: 6
Reputation: 162

Post » Sun Apr 27, 2014 9:02 pm

Yeah, but if I have an family of enemies, they still spawn all their bullets at the same time (even though the spawning time is random). I don't want that. How do I randomize the way a family of enemies spawns bullets?

Image
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Sun Apr 27, 2014 9:12 pm

Try system>every random(20,40)seconds
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Sun Apr 27, 2014 9:40 pm

I just tried that, but the family of enemies still spawn all together. How do I randomize the way a family of enemies spawns bullets?
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Sun Apr 27, 2014 10:13 pm

Hey again, do you guys get what I'm saying?
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Sun Apr 27, 2014 11:44 pm

Bump:( Sorry. Please guys, I really need some help.
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Sun Apr 27, 2014 11:52 pm

Bellow the "every 40 seconds: condition add a "pick a random instance" (from the system conditions) and choose the family. Don't change the actions. It should spawn an arrow randomly from each object from the family now.
composer - multimedia artist
www.eli0s.com/en/
B
68
S
26
G
4
Posts: 1,146
Reputation: 9,649

Post » Mon Apr 28, 2014 12:00 am

Hey @eli0s, thanks, is this what you mean?
Image
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Mon Apr 28, 2014 12:03 am

Providing that the family that its name I can't read and has the spawn action is the same as the one in the condition (Level2Enemies), then yes :)
composer - multimedia artist
www.eli0s.com/en/
B
68
S
26
G
4
Posts: 1,146
Reputation: 9,649

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests