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

Status
Not open for further replies.
Level 6
Joined
Mar 2, 2013
Messages
127
I'm trying to get a dueling system to work, but in the map I'm working on has a shuffle command that mixes up the players to even out the team. So Now I have to add a new Condition so it doesn't put 2 allys up against each other. I just need to know if I have any errors.

[info] I have 2 variables DuelUnit[1] and DuelUnit[2] that have a unit stored in each one. and DuelingUnit = player.

  • Set DuelUnit[1] = (Random unit from DuelGroup[1])
  • Set DuelUnit[2] = (Random unit from DuelGroup[2])
  • Set DuelingUnit = (Owner of DuelUnit[1])
    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (DuelUnit[2] belongs to an enemy of DuelingUnit) Equal to (==) True
      • Then - Actions
      • Else - Actions
        • Skip remaining actions
 
Status
Not open for further replies.
Top