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
Posts: 80
Reputation: 1,118

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
Posts: 80
Reputation: 1,118

Post » Sun Jan 03, 2016 11:10 am

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

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
19
S
10
G
125
Posts: 867
Reputation: 64,937

Post » Sun Jan 03, 2016 2:57 pm

B
28
S
11
G
20
Posts: 729
Reputation: 13,674

Post » Sun Jan 03, 2016 10:17 pm

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


Return to How do I....?

Who is online

Users browsing this forum: RadiantRogue and 2 guests