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

Neutral AI

Status
Not open for further replies.
Level 17
Joined
Mar 21, 2011
Messages
1,611
hi,
i have some neutral hostile creeps with abilities in my map. what would be the best solution to let them cast the abilities? (there should be an option to cast the ability onto the current target and an option for casting it on a random unit in a certain AoE
i know there is a basic creep behavior, but that's not what i want to have.
thanks
 
Level 25
Joined
May 11, 2007
Messages
4,650
By disarmed you mean silenced? I don't know if Warcraft 3 cancels current orders if a unit is ordered to cast a spell while silenced, but if not,

then the above trigger will allow your creeps to cast spells when they can and when they cannot they will try but nothing will happen.

For the random unit part,
just do:
  • Actions
    • Set tempPoint1 = (Position of (Triggering unit))
    • Set tempGroup1 = (Units within 512.00 of tempPoint1 matching ((((Owner of (Matching unit)) is an enemy of (Owner of (Attacked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is Magic Immune) Equal to False))))
    • Set tempUnit = (Random unit from tempGroup1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • tempUnit Not equal to No unit
      • Then - Actions
        • Unit - Order (Attacked unit) to Orc Far Seer - Chain Lightning tempUnit
      • Else - Actions
    • Custom script: call RemoveLocation(udg_tempPoint1)
    • Custom script: call DestroyGroup(udg_tempGroup1)
 
Level 17
Joined
Mar 21, 2011
Messages
1,611
thanks for the trigger, but i know how it works^^ i just wonder whats the most efficient way.
by disarmed i mean disable the unit's ability to do basic attacks
+rep to you


EDIT: i'll just find another way how i'll do the disarm and its fine :)
 
Status
Not open for further replies.
Top