Random Hero dialog and starting gold

Holla.

New Member
Reaction score
14
Yo sup.
Now thats done my problem is, i want one of those dialog boxes to come up at the start of the game, one of them, to decide if its random heroes and the other to make it normal heroes.
I have 11 races (cities) and i wont place any heroes at the start. How do i do this?
(Ps im shit at dialogs this would be my first time)

Secondly, how can i make a dialog box come up AFTER that hero one which decides starting gold.

Ta
 

CaptDeath

New Member
Reaction score
103
what i suggest is to try it
what you need to know is when using dialogs you need 2 variables one is a Dialog Menu the Other is Dialog Buttons which should only be set once
and you need one trigger with
Code:
if then/or else dos
checking if its buttonX
then doing your actiosn if not
Code:
A blnk no do nothings
 

Holla.

New Member
Reaction score
14
what i suggest is to try it
what you need to know is when using dialogs you need 2 variables one is a Dialog Menu the Other is Dialog Buttons which should only be set once
and you need one trigger with
Code:
if then/or else dos
checking if its buttonX
then doing your actiosn if not
Code:
A blnk no do nothings

could you explain in a bit more detail please.. i cant understand
 

Holla.

New Member
Reaction score
14
Random hero mode and starting gold

Supyo.
Ok now that thats done, my question is:
How do i get one of those dialog boxes to come up at the very start of the game that you can use to decide game modes and such. (i think its a dialog box)
The thing i want to decide is 2 things.
First dialog box asked if its Normal hero mode or random hero mode.
For normal hero its easy enough but i dont know how to trigger the dialog boxes and i have no idea how to do random. (11 races, 1 hero per race )

Then i want a second box to come up for starting gold. How could i do this?
 

Naga'sShadow

Ultra Cool Member
Reaction score
49
The best way to go about this is to just start messing with the dialog boxes actions, but I'll give you what I can. First off your going to need a variable for each dialog box and for each option. Create the dialog and fill them with your options. Do this after a second or two, not during map initialization. The reason every option needs a variable is that the only event you can work with is Event-A dialog button is pressed. That has to be a different trigger, you'll need one for each option.

For making random hero selection, create a unit-type array variable, and make it size equal to the number of hero's you have to work with. Next at map initialization set each index equal to a hero. Then in your random trigger order the game to create one unit of type <your hero variable[random number]>. That will get you a random hero.

Note if you test this with same random seed checked you'll get the same random hero each time.
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
http://www.thehelper.net/forums/showthread.php?t=32334

Dialog box tutorial.

To make a random hero, it's basically a matter of setting a unit-type array variable and then creating a random unit out of that array

Set Heros[1] = Paladin
Set Heros[2] = Gene Simmons
Set Heros[3] = etc etc, for all of your heros
Create 1 Heros[Random integer number between 1 and <your number of heroes>

Hope that helps.
 

Holla.

New Member
Reaction score
14
11 random heroes

When my dialog button is clicked to make random Heroes, how can i make a trigger to get ONE hero per type per race on the map.
I have 11 Heroes.
My trigger is something like
Dialog is clicked
Dialog button = to random hero mode
Set randomhero 1 = blademaster
set random hero 2 = far seer

thats all so far, how can i do this? i think this would make 2 or more of same hero. Also whats the same random checkbox?
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
whats the same random checkbox?

What?

Also:

Code:
Actions
 Set RandomHero[1] = Blademaster
 Set RandomHero[2] = Banana
 etc....
 Set RandomHero[11] = Apple
 For each Integer A between 1 and <numberofplayers> do (Actions):
  Create 1 RandomHero[Random integer between 1 and 11] for   Player(Integer A) at wherever facing whatever degrees

Haven't you made like, 3 posts about this same topic? >.>
 

Holla.

New Member
Reaction score
14
Yeah but none of them were specific. Thanks for all your help with everything i fail at btw.
 

Holla.

New Member
Reaction score
14
Why does this trigger spawn 11 heroes?

Ok heres the trigger

Picoftrigger.jpg


now that uve looked at it, my problem is:
Why, when in editor, and i test it, one player, do i spawn 11 heroes at my base.
Second question:
How do you make it so that it only spawns one hero per base and there will not b 2 heroes of the same type anywhere on the map.

Also could someone tell me exactly what to do.

\Thx\
 

istar

New Member
Reaction score
31
you mis-use the loop...
in your case, loop from 1 to 11, it means it does whatever below it 11 times...
if you have 11 players, there is a total of 121 heroes...
i think what you want is
Code:
from integer 1 to 11
create hero(random integer 1 to 11) for player(integerA)
2) use a unitpool!
 

Baltazhar

Active Member
Reaction score
55
istar is right.

However, now that you have made all those Create Unit actions, you might as well keep them.
Just Cut and Paste the Create actions up under the Set RandomHero[11] and remove the For Each Integer A.

- Baltazhar
 

Holla.

New Member
Reaction score
14
wait explain better please.
Also, this method means there could be 2 of the same hero type on the map how can i make it so theres only one of each type!!
 

istar

New Member
Reaction score
31
ok either do it the way i said
Code:
For each integerA from 1 to 11
create hero(random) for player(integerA)
or remove the loop
Code:
create hero(random) for player 1
create hero(random) for player 2
.
.
.
and so on
create hero(random for player 11

use a unitpool so no 2 hero share same type
 

Baltazhar

Active Member
Reaction score
55
Okay, I will try this without the Editor...

You trigger needs to look like this:
Code:
[B]Event[/B]
Dialog - A button is clicked for MyDialog

[B]Condition[/B]
(Clicked dialog button) equal to DialogButton1

[B]Action:[/B]
Game - Display to (All Players) the text: "Hello world!"
Set Randomhero[1] = Rogue Elf (ranged)
Set Randomhero[2] = Bandit commander
[I]... continue this from 3-10 ...[/I]
Set Randomhero[11] = Possed orc
Unit - Create 1 (Randomhero (Random number between 1 and 11)) for Player 1 ...
Unit - Create 1 (Randomhero (Random number between 1 and 11)) for Player 2 ...
Unit - Create 1 (Randomhero (Random number between 1 and 11)) for Player 3 ...
[I]...Continue this until you are done ...[/I]

Think that's the best I can explain it. Do you catch my drift?

- Baltazhar
 

Holla.

New Member
Reaction score
14
whats a unit pool, i need to know how to make one o_O
Btw, plus rep for helping me, im tired and a bit hopeless at triggering. sorry to be a bother.
 

Baltazhar

Active Member
Reaction score
55
I actually don't know, but do expect istar to elaborate.
I know of unit groups, but never heard of unit pools.
Either way, it's not necessary to use a unit pool for this trigger. Did you try what I suggested? And did it work?

And np mate, we're here to help. Don't feel like you are being a bother :)

- Baltazhar
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top