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!
Well you should explain a bit more about your random system you want use.
But in many cases you store all heroes into a variable and use the random int check:
JASS:
function x takes nothing returns nothing
local integer i = GetRandomInt(1,100)
if i == 1 then
// first champ
elseif i == 2 then
// second champ
elseif i == 3 then
// third chamo
elseif
// and so on
endfunction
[I don't know the GUI way anymore]
Well and item drops on neutral units when they die or when? You can use item tables for it.
Trigger - Add to random <gen> the event (Player - (Player((Integer A))) types a chat message containing -random as An exact match)
and this to get the hero
random
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) Current gold) Greater than or equal to 500
Then - Actions
Unit - Create 1 random_heroes[(Random integer number between 1 and numberOfHeroes)] for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
Player - Add -500 to (Triggering player) Current gold
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.