• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Random Heroes "help"

Status
Not open for further replies.

JyrKz

J

JyrKz

Hey 8)

Im making a cool map i got a little trouble at the moment :x


- At start "Red" gots a dialog with Pick Self Heroes or Random Heroes.

- when "Red" selects Pick Self Heroes then all players need to select there heroes there self's.. Heroes are placed on the upper left map , when "player" selects the hero what he wants to use , then the hero will be removed where it was befor (upper left) and it will be created to the player "who selected him" at the center of the map. <--- this works fine but i need to make it work with "random heroes" so when "red" selects "random Heroes" at start it will pick random heroes for all players and remove those heroes from upper left who were picked random.

(Could you give me a example if its possible)

-JyrKz :P
 
It is easy
I can write to you how to do it in trigger editor:
first create a region in place wher you choose hero (wher ther are hero to choose).
Then give hero to player who doesnt have ANY difrent units (dont give to this player circle of power)
Now create triggers like this:

Event:
(make it by your self)
Action:
playrs group: Pick players group (all player of control Human) and do actions:
Crate random unit:(random unit at region(name of region) owen to (piced player)
Remove unit random unit of type (last created unit) at region (name of region)

It should work
I cant write it in jass because I`am not good in JASS
Sry for all my mistakes.
 
doing this without worldedit, so bear with mistakes

Event:
----(dialog button clicked)
Condition:
----Button clicked = Random [[button variable]]
Actions:
----For each Integer A from 1 to 12 do multiple actions:
---Unit:Pick random unit from HeroSelectRegion [[large region encompasing all the heroes in the top left corner]] and do
--if Boolean:((matching unit) is a hero equal) to true)
--then UNit: move Picked unit to CenterRegion
Unit: Change ownership of picked unit to Player[IntegerA] and change colour
--Else do nothing


That might do it, prolly would need some corrections (only once has a trigger worked first time for me)

Bort
 
Status
Not open for further replies.
Back
Top