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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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