• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Random Heroes "help"

Status
Not open for further replies.
Level 1
Joined
Apr 25, 2005
Messages
1
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
 
Level 3
Joined
Aug 10, 2004
Messages
59
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.
 
Level 6
Joined
Aug 29, 2004
Messages
159
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.
Top