• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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