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

Selection issues

Status
Not open for further replies.
Level 10
Joined
Aug 8, 2004
Messages
562
i am having trouble selecting a random unit thats an enemy of the caster, and so it can't select the caster itself.
Here is what i have:

Set Random_Unit_1_C = (Random unit from (Units within 600.00 of (Position of Caster_C) matching (((Random_Unit_1_C is A structure) Equal to False) and (((Random_Unit_1_C belongs to an enemy of (Owner of Caster_C)) Equal to True) and ((Random_Unit_1_C is in (Units owned by (Owner of Caster_C)) equal to False)


but for some reason it still can select the caster.

HELP PLEASE!!!
 
Level 6
Joined
Dec 13, 2004
Messages
320
Set Random_Unit_1_C = (Random unit from (Units within 600.00 of (Position of Caster_C) matching (((Matching Unit is A structure) Equal to False) and (((Matching Unit belongs to an enemy of (Owner of Caster_C)) Equal to True) and ((Matching Unit is in (Units owned by (Owner of Caster_C)) equal to False)

What I've done is changed all the entries for Random_Unit_1_C to Matching Unit except for the Set Random_Unit_1_C. This should work! :wink:
 
Status
Not open for further replies.
Top