- Joined
- Oct 6, 2008
- Messages
- 75
Enemy Creeps Get stuck on wall
---------------------------------------------------------------------------------------------------------------------
Im making a castle defence type survival game. Each player gets a hero and they have to survive in a fort. The monsters are supposed to attack these 2 barricades and the players repair it. Anyway, often if a player is in a particular position, the monsters will try to attack a player but get stuck on impassible terrain. How can i fix this so that the monsters go for the wall first even if they are getting attacked.
Ive tryed making it so the enemy can only attack walls then when the wall is down they are transformed into enemies that can attack anything. The problem is that if the player goes outside of the fort, the enemy wont attack them, making the whole thing pointless.
Is there some sort of ai i could create to make them go for walls first and not become stupid idiots and get stuck when being attacked ???
Any suggestions would be great
Here is one of my movement triggers
--------------------------------------------------------------------------------------------------------------------
Monsters Movement 1A
Events
Time - Every 2.00 seconds of game time
Conditions
(Number of units in (Units in (Playable map area))) Less than or equal to 100
Actions
Unit - Create 1 Death-Mantis can for Player 12 (Brown) at (Center of north spawn <gen>)
Set Monsters[1] = (Last created unit)
Unit - Order Monsters[1] to Attack-Move To (Center of monster target north <gen>)
Unit - Create 1 Death-Mantis can for Player 12 (Brown) at (Center of south spawn <gen>)
Set Monsters[2] = (Last created unit)
Unit - Order Monsters[2] to Attack-Move To (Center of Monster Target <gen>)
---------------------------------------------------------------------------------------------------------------------
Im making a castle defence type survival game. Each player gets a hero and they have to survive in a fort. The monsters are supposed to attack these 2 barricades and the players repair it. Anyway, often if a player is in a particular position, the monsters will try to attack a player but get stuck on impassible terrain. How can i fix this so that the monsters go for the wall first even if they are getting attacked.
Ive tryed making it so the enemy can only attack walls then when the wall is down they are transformed into enemies that can attack anything. The problem is that if the player goes outside of the fort, the enemy wont attack them, making the whole thing pointless.
Is there some sort of ai i could create to make them go for walls first and not become stupid idiots and get stuck when being attacked ???
Any suggestions would be great
Here is one of my movement triggers
--------------------------------------------------------------------------------------------------------------------
Monsters Movement 1A
Events
Time - Every 2.00 seconds of game time
Conditions
(Number of units in (Units in (Playable map area))) Less than or equal to 100
Actions
Unit - Create 1 Death-Mantis can for Player 12 (Brown) at (Center of north spawn <gen>)
Set Monsters[1] = (Last created unit)
Unit - Order Monsters[1] to Attack-Move To (Center of monster target north <gen>)
Unit - Create 1 Death-Mantis can for Player 12 (Brown) at (Center of south spawn <gen>)
Set Monsters[2] = (Last created unit)
Unit - Order Monsters[2] to Attack-Move To (Center of Monster Target <gen>)