enemy random jump

Get help using Construct 2

Post » Tue Dec 29, 2015 12:23 pm

how I do to make every enemy jump in random ?. Not all enemies at the same time. Thanks

http://www.mediafire.com/download/fnm0632jury2rn9/enemy+jump+random.capx
B
10
S
4
G
1
Posts: 80
Reputation: 1,618

Post » Tue Dec 29, 2015 1:22 pm

You have to use the "For each" loop, as in "For each enemy <pick enemy instance name/family name>" every random interval ---> jump code.
Brick by brick, stone by stone.
B
52
S
24
G
17
Posts: 273
Reputation: 12,663

Post » Tue Dec 29, 2015 8:10 pm

Could you fix the capx?
B
10
S
4
G
1
Posts: 80
Reputation: 1,618

Post » Sun Jan 03, 2016 11:10 am

I do not get it working. I need more help
B
10
S
4
G
1
Posts: 80
Reputation: 1,618

Post » Sun Jan 03, 2016 12:03 pm

add timer behavior

on enemy create: start timer"jump" random(2,4) (once)

for each enemy
ontimer "jump" :simulate jump and start timer "jump" random(2,4) (once)
Image Image
B
22
S
13
G
130
Posts: 869
Reputation: 67,816

Post » Sun Jan 03, 2016 2:57 pm

B
29
S
12
G
20
Posts: 759
Reputation: 13,861

Post » Sun Jan 03, 2016 10:17 pm

Thanks . The enemies are more better
B
10
S
4
G
1
Posts: 80
Reputation: 1,618


Return to How do I....?

Who is online

Users browsing this forum: David181, plinkie, webebiz and 2 guests