How to make monsters walk towards a player?
PTIGameStudios
Member Posts: 16
How do i make monster's walk towards a player? My gaming club and I are making a zombie side view shoot em up game and we have walking working and everything. Now we have it so you can walk back and forth but how do i make it so the monsters i place in the level automatically walk towards him. Once they get to him they hit him so i need code to trigger that animation and then i need to set up a health bar.
Can you give me some video reference? I can't use youtube because I'm at school and they have it blocked so if you can somehow give me the video somewhere else like if you download it with a downloader and upload it to a website with html5 or something i can watch it...
I know I'm asking a lot of you but i just need these videos :S
I CAN view youtube mobile so you can give me links to that...
Can you give me some video reference? I can't use youtube because I'm at school and they have it blocked so if you can somehow give me the video somewhere else like if you download it with a downloader and upload it to a website with html5 or something i can watch it...
I know I'm asking a lot of you but i just need these videos :S
I CAN view youtube mobile so you can give me links to that...
Comments
A gaming club sounds like fun.
Edit: If you don't know how to do that, you'll probably have another check within that rule to determine which way he'll move based on the player's position.
If you haven't already, make a two real global attributes for your main character's X and Y values
double edit: The demo isn't a youtube video, it's actually a gamesalad demo.
If you can't find it, you're going to have this is a constrained attribute [Distance from = Magnitude (self.position x - game.playerx , self.positiony - game.playery)
This will keep track of the distance X and y between your zombie and the player and store it in the local attribute "distance from" (you need to make this obviously)