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

Duel Trigger?!?!?

Status
Not open for further replies.
Level 3
Joined
Jun 2, 2014
Messages
64
Hey I making my own hero wars sorta map o_O

I was wondering if anyone knew how to make a duel? Such as every - Lets say 3 minutes - that it would pick a random hero on each team and put them into an arena.

Anyone have an idea of how I can do this? Please help me!!!
 
Level 12
Joined
Nov 3, 2013
Messages
989
  • Set HeroesTeam1 = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True)))
  • Set HeroesTeam2 = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of Player 2 (Blue)) Equal to True))
  • Unit - Move (Random unit from (HeroesTeam1)) instantly to (Center of (Playable map area))
  • Unit - Move (Random unit from (HeroesTeam2)) instantly to (Center of (Playable map area))
This is under the assumption that you have 2 teams and that red and blue are in two different teams.'

Edit: added hero classification boolean condition

Edit 2: lol forgot the timer
 
Events - DualTimer expires
Conditions -
Actions -
Set DualUnit1 = Random unit from Team1
Set DualUnit2 = Random unit from Team2
Move DualUnit1 instantly ArenaPoint1
Move DualUnit2 instantly ArenaPoint2


DualTimer is a timer variable
DualUnit1/2 are unit variables
Team1/2 are unit group variables and contains all heroes from each team
ArenaPoint1/2 are point variables and should be set to the points in the arena you want the units to be moved to. These points should never be removed.
 
Level 3
Joined
Jun 2, 2014
Messages
64
Time - DuelOnTimer expires

Countdown Timer - Destroy (Last created timer window)
Set HerosTeamOne = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True)))
Set HerosTeamTwo = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Triggering unit) belongs to an ally of Player 6 (Orange)) Equal to True)))
Set DuelUnit1 = (Random unit from HerosTeamOne)
Set DuelUnit2 = (Random unit from HerosTeamTwo)
Unit - Move DuelUnit1 instantly to (Center of Region 001 <gen>)
Unit - Move DuelUnit2 instantly to (Center of Region 000 <gen>)

I tried it in both ways. And also tried to use both in one such as shown above. But it don't seem to be working for me?
 
Level 3
Joined
Jun 2, 2014
Messages
64
Though I am wondering when someone kills the other player....

what would you do to make the winner exit out of the arena?
 
Events - A unit dies
Conditions -
Dying unit equal to DualUnit1
or
Dying unit equal to DualUnit2
Actions -
Do something
Set DualUnit1 to No unit
Set DualUnit2 to No unit

Edit:
If you want the winning unit to be placed at the location he was before entering the arena then you need to save his location before moving him:

Time - DuelOnTimer expires

Countdown Timer - Destroy (Last created timer window)
Set HerosTeamOne = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True)))
Set HerosTeamTwo = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Triggering unit) belongs to an ally of Player 6 (Orange)) Equal to True)))
Set DuelUnit1 = (Random unit from HerosTeamOne)
Set DuelUnit2 = (Random unit from HerosTeamTwo)
Set DualUnit_Point1 = Position of DualUnit1
Set DualUnit_Point2 = Position of DualUnit2
Unit - Move DuelUnit1 instantly to (Center of Region 001 <gen>)
Unit - Move DuelUnit2 instantly to (Center of Region 000 <gen>)
Turn on Duel In Action

Duel In Action
Events - A unit dies
Conditions -
Dying unit equal to DualUnit1
or
Dying unit equal to DualUnit2
Actions -
If - Killing unit equal DualUnit1
Then - Move DualUnit1 to DualUnit_Point1
Else - Move DualUnit2 to DualUnit_Point2
Set DualUnit1 to No unit
Set DualUnit2 to No unit
Remove DualUnit_Point1
Remove DualUnit_Point2
Turn off this trigger

Something like that.
 
Status
Not open for further replies.
Top