Zombies n Stuff
CoffeCup
Member Posts: 5
Hluu! About to start a kinda zombie-survival type game and i got some questionz...
How do i make the zombies like track or follow the actor?
Two, the players are gonna be inside a house, and i want the zombies to break the doors before they can enter the house. It will take longer for "weaker" zombies to enter, shorter for stronger.
3, when you stand in front of the door, a button will appear that says "fix" wich will fix the door.
Many questions here, but LÖVE some help!
Micke
How do i make the zombies like track or follow the actor?
Two, the players are gonna be inside a house, and i want the zombies to break the doors before they can enter the house. It will take longer for "weaker" zombies to enter, shorter for stronger.
3, when you stand in front of the door, a button will appear that says "fix" wich will fix the door.
Many questions here, but LÖVE some help!
Micke
Comments
create two game integer attributes - game.heroX and game.HeroY
then in your hero actor you'll need two constrain behaviors:
constrain game.heroX to self.position.X and constrain game.heroY to self.positionY
Then in the zombies you have a number of options. Probably the easiest is accelerate towards or move to. Simply put heroX as the x coordinate and heroY as the y coordiante. Or you could try using two interpolate behaviors (one for x and one for y)