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

unit in region condition?

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
is there a condition where you can check a unit uses an ability in a set region?

I want to make a "talk" ability, but need a way to check the talking hero is in the region next to an NPC? or is there another method of doing this?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
This is one way to do it:

  • Untitled Trigger 074
    • Events
      • Unit - A unit enters Region 001 <gen>
    • Conditions
    • Actions
      • Unit Group - Add (Triggering unit) to Check_Group
  • Untitled Trigger 075
    • Events
      • Unit - A unit leaves Region 001 <gen>
    • Conditions
    • Actions
      • Unit Group - Remove (Triggering unit) from Check_Group
  • Untitled Trigger 076
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to ...
      • ((Triggering unit) is in Check_Group) Equal to True
    • Actions
 
Level 7
Joined
Jul 18, 2009
Messages
272
Why so complicated?

There is a condition "unit - unit in region".

It's even more easy (because you don't need any regions) when you use the condition "(Distance between (Position of (Target unit of ability being cast)) and (Position of (Triggering unit))) less than 400.00" (Real Comparison).
 
Level 10
Joined
Apr 3, 2006
Messages
535
thanks, i got the triggers working now, i am jsut searching for a suitable dummy spell for my "talk" ability, any suggestions, and of course +rep both of you
 
Status
Not open for further replies.
Top