• 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.

Having units seek cover?

Status
Not open for further replies.
Level 7
Joined
Dec 23, 2008
Messages
162
Well, I was really hoping that somebody could help me out with a system I am trying to build. I want units in combat to seek a doodad, such as a tree or sandbag, as cover and if there is not enough cover, for the other units to just stand in the open. Anyone have an idea how I would go about with this? I have not the slightest clue.
 
Create regions on or near the doodads, wherever you want them to 'hide'.
Create a trigger with any event you want, such as (unit is attacked) or (unit begins attacking), something like that.
Use the trigger to order the unit to the nearest region of interest, or do it by zones of larger regions (example, marine A is in Zone 1 and the trigger knows this, so it sends him to Doodad 1, but marine B is in Zone 3 and the trigger knows this as well, so it sends him to Doodad 5. This can be done with much time and the cleaver use of variables. For a small idea on how to manipulate variables go here.)
 
Status
Not open for further replies.
Top