• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Enemy creeps get stuck on wall

Status
Not open for further replies.
Level 9
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 :D

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>)
 
Level 34
Joined
Jul 4, 2007
Messages
5,552
In many games the important things must come first, then the less important ones:
1 Units and heroes.
2 Attacking buildings.
3 Buildings.

I believe it's called ''Priority'' in the Object Editor.
 
Status
Not open for further replies.
Top