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

Hero Duels Help

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
Im trying to make a small hero duel part as a side thing on one of mny maps, but im 100% stuck as i have no idea where to begin to get this working. Basicly i need it so that when players enter the duel they get 100% life/mana and when they "loose" they dont actually die, as you have to pay a hefty gold penatly to come back to life on the map.

Ive made a small areana with some obsticles and things to run about and hide and use the terrain to advantage but i dont know where to begin with triggers etc.

i think the hard part of this is taking two unknown heroes, telporting them to the areana and making them treat each other as enemys whilst in arean, then ally up again afterwards
 
Level 10
Joined
Apr 3, 2006
Messages
535
my problem is i can assign a variable to units because the units are not on the map at the start, eg you choose a hero and its hard to assign a vartiable to an unkown choice?
 
FOr making them have 100% life and mana do this:

Event-Unit enters Region
Action-Unit-Set life of entering unit to 100%.

As for the heroes,you shall explain more what you need.If you need a random hero,make an array variable and put heroes in it.If you can't do this say it here.

Then do this:(I think it is wrong)
Unit-Pick random unit from ''variable'' and do actions.
 
Level 10
Joined
Apr 3, 2006
Messages
535
The map is an rpg, and im trying to do this duel thngy a side fun thing, so i need it to un ally the 2 players dueling, move players to duel area, not treat the death as an actual death in duel arena then ally player again, and then move player back to main map are

im using a dialog system, click on X button and X charcacter is created, for triggering player. I dont know how to assign the viarable to a unit that isnt on the map from the start, eg i cant click on it in editor because its not there. Is there a way to assign variable to a player, and then make viarble 1, treat variable 2 as enemy etc.
 
Level 5
Joined
May 21, 2006
Messages
174
You can use this to store the Hero in to the variable after its created from the dialogue:
  • Set UnitVariableHere = (Last Created Unit)
And you can make something like this to make them enemies:
  • Player - Make (Owner of Dueller[1]) treat (Owner of Dueller[2]) as an enemy
And vice versa.
 
Level 10
Joined
Apr 3, 2006
Messages
535
ok i managed to figure this one out. Seems i was making it to complicated, so i went for the easier route....
a unit eneter region
make owner of triggering unit
treat players 1-6 as enemy

then when leaving arean its the reverse
when leaving arean, treat players 1-6 as allys with shared LOS etc
thanks again everyone..
 
Status
Not open for further replies.
Top