The Daily Click ::. Forums ::. Klik Coding Help ::. Zombie Collision
 

Post Reply  Post Oekaki 
 

Posted By Message

G. Hull



Registered
  07/01/2009
Points
  125

Wii Owner
5th October, 2010 at 16:25:55 -

Hey everyone. I've got a coding problem. I have a swarm of zombies, constantly chasing the player. When they get close, they attack. Here are my problems: When the zombies collide with any obstacles, I want them to basically stop (Seeing as they aren't smart enough to find a path around). When they collide with each other, also, I would like for them to stop. I have already taken note that Assault Andy did a game with zombies exactly like this. Which is really what I'm looking for in my game. The problem is, I got lost when looking through Assault Andy's code for zombies. Plus I have no idea how to use the Box2D extension. So I'm posting here. Any help?

Cheers,
G. Hull

 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
5th October, 2010 at 19:41:37 -

You can use the built in movement if u use mmf 2, i used it and it was actually pretty good. Just set 8 dir movement or any kind actually, and when collision make them to stop, you can also make a object move another object using stop on both objects and changing the direction of the moving object. It's quite usefull actually, and you can still keep any custom movement you have.

 
Code me a sausage!

G. Hull



Registered
  07/01/2009
Points
  125

Wii Owner
6th October, 2010 at 03:55:40 -

Well, I see what you're talking about. However, as a general rule, I don't use built-in movements very often. They tend to be tedious, and you have no control over them. I'd prefer for it to be coded. Thanks for your help, though.

 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
6th October, 2010 at 13:45:46 -

you don't have to use them for anything else than what you need, you can ignore user movement via event and still use it with custom coding, but it depends on what you need. I find it excellent if i need the player to move objects around or just for stoping things.
But it depends on what kind of movement you want...

Edited by Don Luciano

 
Code me a sausage!
   

Post Reply



 



Advertisement

Worth A Click