How do I prevent zombies from jumping?

Get help using Construct 2

Post » Tue Jun 10, 2014 4:21 pm

I have platformer where zombies move left or right depending on where the player is. If they hit a solid, they jump up over it. The problem is, zombies are also solids. How do I make it so the zombies will jump when they run into a solid/tilemap obstacle, but will not jump (wait until clear) when they run into another zombie? Right now the zombies all start jumping up on top of one another and begin to create a tall stack.
B
3
Posts: 4
Reputation: 183

Post » Tue Jun 10, 2014 5:02 pm

Perhaps adding a variable in which when an enemy collides with another enemies it doesn't jump so jump is true only if it meets the criteria. If you still have problems perhaps load the capx file and we can help you (or at least try to since Im still learning too :) )
Cheers
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Tue Jun 10, 2014 5:20 pm

Maybe the key is in using overlap at offset to keep the zombies from moving, but to pick the one closest to the player and allow that one to keep moving?
I tried playing with variables/collisions, but those didn't seem to work.

ZombieCrowdMovement.capx
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 4
Reputation: 183

Post » Tue Jun 10, 2014 11:34 pm

Hey, I think this might be what you want. I'm not sure but let me sure if this helps you.
I commented the lines I changed so it's more clear for you :)

https://www.dropbox.com/s/oky2ht56gf48vw1/Zombie.capx

Cheers!
B
43
S
12
G
14
Posts: 488
Reputation: 10,570


Return to How do I....?

Who is online

Users browsing this forum: el3um4s and 8 guests