Leveling to change unit

Riptz

New Member
Reaction score
0
Okay, I'm making a game where when you get a certain level, and a dialog box pops up and you're able to choose your unit then, and your unit that leveled is replaced with that new unit. Any help on doing this?

I got all the dialog boxes up, but when I click the box, nothing works.

14094706mt1.png
 

Riptz

New Member
Reaction score
0
The text is showing, but when I actually click the text, nothing happens. Its says It failed, as posted on the picture on top.

58656137mk7.png
 

Nexor

...
Reaction score
74
the text is not showing?

and your dialog buttons array value is IntegerA, choose a number
 

CaptDeath

New Member
Reaction score
103
well first Wc3 tags around the text is probly eaier then uploading images 24/7
And what you need is
A dialgo butt... is clicked
condition
then actions including If/Thens/Elses For Which Button
this was done for me as a hero pick system so should atke out some of them i would but i sleepy
Trigger:
  • Select
    • Events
      • Dialog - A dialog button is clicked for diaChoose
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to (==) diabHeroes[1]
        • Then - Actions
          • Set boolClicked[1] = True
          • Unit - Create 1 Paladin for (Triggering player) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
          • Player Group - Remove (Triggering player) from pgNotChosen
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to (==) diabHeroes[2]
        • Then - Actions
          • Set boolClicked[2] = True
          • Unit - Create 1 Mountain King for (Triggering player) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
          • Player Group - Remove (Triggering player) from pgNotChosen
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to (==) diabHeroes[3]
        • Then - Actions
          • Set boolClicked[3] = True
          • Unit - Create 1 Archmage for (Triggering player) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
          • Player Group - Remove (Triggering player) from pgNotChosen
        • Else - Actions
      • -------- Divider --------
      • Player Group - Pick every player in pgNotChosen and do (Actions)
        • Loop - Actions
          • Dialog - Show diaChoose for (Picked player)
      • Dialog - Clear diaChoose
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • boolClicked[1] Equal to (==) False
          • Then - Actions
            • Dialog - Create a dialog button for diaChoose labelled Hero 1
            • Set diabHeroes[1] = (Last created dialog Button)
          • Else - Actions
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • boolClicked[2] Equal to (==) False
          • Then - Actions
            • Dialog - Create a dialog button for diaChoose labelled Hero 2
            • Set diabHeroes[2] = (Last created dialog Button)
          • Else - Actions
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • boolClicked[3] Equal to (==) False
          • Then - Actions
            • Dialog - Create a dialog button for diaChoose labelled Hero 3
            • Set diabHeroes[3] = (Last created dialog Button)
          • Else - Actions
      • Player Group - Pick every player in pgNotChosen and do (Actions)
        • Loop - Actions
          • Dialog - Show diaChoose for (Picked player)

Trigger:
  • Start
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Dialog - Create a dialog button for diaChoose labelled Hero 1
      • Set diabHeroes[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for diaChoose labelled Hero 2
      • Set diabHeroes[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for diaChoose labelled Hero 3
      • Set diabHeroes[3] = (Last created dialog Button)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Dialog - Show diaChoose for (Picked player)

FOR THE map containing it
http://www.mediafire.com/?dou4wtmzuwz

And the guy K0sA
The thread
http://www.thehelper.net/forums/showthread.php?t=108445
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
You say "Unit - Create 1 Heroes(IntegerA) for (Triggering Player),...". Where is the Integer action? Where is the "For each Integer A from 1 to X, Loop - Actions"?

You need to do this: For each Integer A from 1 to 5 (as many as your dialog buttons), Loop - Actions: Create 1 Heroes(IntegerA). Else, it won't work.

The same goes to the clicked button as well. You say "Clicked Dialog Button Equal to DialogButtons (IntegerA)". No, you need the Integer action to do that.

So,

Trigger:
  • Events
    • A dialog button is clicked
    • Conditions
    • Actions
    • For each Integer A from 1 to 5,
    • Loop - Actions
      • If (Conditions)
        • Clicked dialog button Equal to DialogButtons[IntegerA]
      • Then (Actions)
        • Unit - Create 1 Heroes[IntegerA] for (Triggering Player), blah blah
      • Else
        • Do Nothing
 

CaptDeath

New Member
Reaction score
103
oh as ive been told you dont need the else fucntion do nothing
Trigger:
  • Pharaohs exe trigger
    • Events
      • A dialog button is clicked
    • Conditions
    • Actions
      • For each Integer A from 1 to 5,
        • Loop - Actions
          • If (Conditions)
            • Clicked dialog button Equal to DialogButtons[IntegerA]
          • Then (Actions)
            • Unit - Create 1 Heroes[IntegerA] for (Triggering Player), blah blah
          • Else

Just dont do this with your next action not realated to the if then do
Trigger:
  • Pharaohs exe trigger
    • Events
      • A dialog button is clicked
    • Conditions
    • Actions
      • For each Integer A from 1 to 5,
        • Loop - Actions
          • If (Conditions)
            • Clicked dialog button Equal to DialogButtons[IntegerA]
          • Then (Actions)
            • Unit - Create 1 Heroes[IntegerA] for (Triggering Player), blah blah
          • Else
            • Example It should not go here

Trigger:
  • Pharaohs exe trigger
    • Events
      • A dialog button is clicked
    • Conditions
    • Actions
      • For each Integer A from 1 to 5,
        • Loop - Actions
          • If (Conditions)
            • Clicked dialog button Equal to DialogButtons[IntegerA]
          • Then (Actions)
            • Unit - Create 1 Heroes[IntegerA] for (Triggering Player), blah blah
          • Else
      • Example It should go here
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top