Hero Dialog Help [+Rep]

Fire-Wolf

S.P.D Smoke Pot Daily, Legalize It!
Reaction score
54
Alright so I am planning on making an Rpg for Starcraft II similar to a Fallout game with a large open landscape, tons of guns, armor, skills, abilities, quests, monsters, ect. I have started creating the hero system and the stats dialog works perfect, however the more complicated skill dialog isnt functioning properly. It opens but does not close, and you can only select the first skill in the list box. I have gone over the gui multiple times and find no errors, so now I am asking for help! Any help would be greatly appreciated. If I cannot figure out how to use the list box then I might have to lower the amount of skills, but I would rather have the list box.

Create Char
Events
Game - Player Any Player types a chat message containing "-new", matching Exactly
Local Variables
Conditions
(Number of Any units in (Unit group(Hero[(Triggering player)]))) == 0
Actions
Unit - Create 1 Marine 2 for player 1 at (Center of (Entire map)) facing (Random angle) degrees (No Options)
Variable - Set Hero[(Triggering player)] = (Last created unit)
Variable - Set Heroweap[(Triggering player)] = 1
Player Group - Pick each player in (Player group((Triggering player))) and do (Actions)
Actions
Variable - Set skilltxtlvl[(Picked player)][1] = "- - Required Level 0 - - "
Variable - Set skilltxtlvl[(Picked player)][2] = "- - Required Level 2 - - "
Variable - Set skilltxtlvl[(Picked player)][3] = "- - Required Level 4 - - "
Variable - Set skilltxtlvl[(Picked player)][4] = "- - Required Level 0 - - "
Variable - Set skilltxt[(Picked player)][1] = ("- - Training - - " + (skilltxtlvl[(Picked player)][1] + "The Training skill adds two skill p..."))
Variable - Set skilltxt[(Picked player)][2] = ("- - Gun Expert - - " + (skilltxtlvl[(Picked player)][2] + "The Gun Expert skill adds 5% more d..."))
Variable - Set skilltxt[(Picked player)][3] = ("- - Toughness - - " + (skilltxtlvl[(Picked player)][3] + "The Toughness skill adds +1 armor a..."))
Variable - Set skilltxt[(Picked player)][4] = ("- - Swift Feet - - " + (skilltxtlvl[(Picked player)][4] + "The Swift Feet skill adds .5 moveme..."))

ButtonIni
Events
Timer - Elapsed time is 0.1 Real Time seconds
Local Variables
Conditions
Actions
Dialog - Create a Modal dialog of size (150, 50) at (0, 25) relative to Top Left of screen
Variable - Set statdia = (Last created dialog)
Dialog - Create a button for dialog (Last created dialog) with the dimensions (150, 50) anchored to Top Left with an offset of (0, 0) setting the tooltip to "Stat points are awarded every level..." with button text "Stats" and the hover image set to ""
Variable - Set statdia2 = (Last created dialog item)
Dialog - Create a Modal dialog of size (150, 50) at (0, 80) relative to Top Left of screen
Variable - Set skilldia = (Last created dialog)
Dialog - Create a button for dialog (Last created dialog) with the dimensions (150, 50) anchored to Top Left with an offset of (0, 0) setting the tooltip to "Skill points are awarded every even..." with button text "Skills" and the hover image set to ""
Variable - Set skilldia2 = (Last created dialog item)
Dialog - Create a Modal dialog of size (480, 190) at (0, 0) relative to Center of screen
Variable - Set statscreen = (Last created dialog)
Dialog - Set title of statscreen to "Statistics"
Dialog - Create a button for dialog (Last created dialog) with the dimensions (100, 100) anchored to Bottom Left with an offset of (25, 50) setting the tooltip to "Skill points are awarded every even..." with button text "Perception" and the hover image set to ""
Variable - Set statscreenb[0] = (Last created dialog item)
Dialog - Create a button for dialog (Last created dialog) with the dimensions (100, 100) anchored to Bottom Left with an offset of (135, 47) setting the tooltip to "Skill points are awarded every even..." with button text "Agility" and the hover image set to ""
Variable - Set statscreenb[1] = (Last created dialog item)
Dialog - Create a button for dialog (Last created dialog) with the dimensions (100, 100) anchored to Bottom Left with an offset of (245, 45) setting the tooltip to "Skill points are awarded every even..." with button text "Endurance" and the hover image set to ""
Variable - Set statscreenb[2] = (Last created dialog item)
Dialog - Create a button for dialog (Last created dialog) with the dimensions (100, 100) anchored to Bottom Left with an offset of (355, 43) setting the tooltip to "Skill points are awarded every even..." with button text "Intelligence" and the hover image set to ""
Variable - Set statscreenb[3] = (Last created dialog item)
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
Dialog - Create a Modal dialog of size (200, 100) at (0, 50) relative to Top Right of screen
Variable - Set Points[(Picked player)] = (Last created dialog)
Dialog - Create a label for dialog (Last created dialog) with the dimensions (250, 75) anchored to Top Left with an offset of (25, 25) with the text ("Stat Points: " + (Text(statp[(Picked player)]))) color set to White text writeout set to False with a writeout duration of 2.0
Variable - Set statd[(Picked player)] = (Last created dialog item)
Dialog - Create a label for dialog (Last created dialog) with the dimensions (250, 75) anchored to Top Left with an offset of (25, 50) with the text ("Skill Points: " + (Text(skillp[(Picked player)]))) color set to White text writeout set to False with a writeout duration of 2.0
Variable - Set skilld[(Picked player)] = (Last created dialog item)
Dialog - Show (Last created dialog) for (Player group((Picked player)))
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
Dialog - Create a Modal dialog of size (350, 500) at (162, 0) relative to Center of screen
Variable - Set skillscreen[(Picked player)] = (Last created dialog)
Dialog - Set title of skillscreen[(Picked player)] to "Skills"
Dialog - Create a List Box for dialog (Last created dialog)
Variable - Set skillscreenb[(Picked player)] = (Last created dialog item)
Dialog - Set (Last created dialog item) size to (300, 375) for (All players)
Dialog - Move (Last created dialog item) to (25, 75) relative to Top Left of dialog for (Player group((Picked player)))
Dialog - Select item 0 of (Last created dialog item) for (All players)
Dialog - Add list item "Training" to (Last created dialog item) for (Player group((Picked player)))
Dialog - Add list item "Swift Feet" to (Last created dialog item) for (Player group((Picked player)))
Dialog - Add list item "Gun Expert" to (Last created dialog item) for (Player group((Picked player)))
Dialog - Add list item "Toughness" to (Last created dialog item) for (Player group((Picked player)))
Dialog - Create a Modal dialog of size (350, 500) at (-162, 0) relative to Center of screen
Variable - Set skillscreen2[(Picked player)] = (Last created dialog)
Dialog - Create an image for dialog (Last created dialog) with the dimensions (300, 250) anchored to Top Left with an offset of (25, 25) setting the tooltip to "" using the image Assets\Textures\wireframe-terran-marine.dds as a Normal type with tiled set to False tint color Green and blend mode Normal
Variable - Set skillscreen2img[(Picked player)] = (Last created dialog item)
Dialog - Create a label for dialog (Last created dialog) with the dimensions (300, 200) anchored to Top Left with an offset of (25, 275) with the text "Choose a skill to view it here." color set to White text writeout set to False with a writeout duration of 2.0
Variable - Set skillscreen2txt[(Picked player)] = (Last created dialog item)
Dialog - Create a button for dialog (Last created dialog) with the dimensions (150, 50) anchored to Bottom Left with an offset of (25, 25) setting the tooltip to "" with button text "Purchase" and the hover image set to ""
Variable - Set skillscreenb2[(Picked player)][0] = (Last created dialog item)

Skillscreen
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Changed Selection
Local Variables
Conditions
(Used dialog item) == skillscreenb[(Triggering player)]
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Selected list item of skillscreenb[(Triggering player)] for (Triggering player)) == 1
Then
Dialog - Set skillscreenb2[(Triggering player)][0] color to Green for (Player group((Triggering player)))
Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Triggering player)][1] for (Player group((Triggering player)))
Variable - Set skillselect[(Triggering player)] = 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Selected list item of skillscreenb[(Triggering player)] for (Triggering player)) == 3
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
Herolvl[0] >= 2
Then
Dialog - Set skillscreenb2[(Triggering player)][0] color to Green for (Player group((Triggering player)))
Variable - Set skilltxtlvl[(Picked player)][2] = "- - Required Level 2 - - "
Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][2] for (Player group((Triggering player)))
Variable - Set skillselect[(Triggering player)] = 2
Else
Dialog - Set skillscreenb2[(Triggering player)][0] color to Gray for (Player group((Triggering player)))
Variable - Set skilltxtlvl[(Picked player)][2] = "- - Required Level 2 - - "
Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][2] for (Player group((Triggering player)))
Variable - Set skillselect[(Triggering player)] = 2
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Selected list item of skillscreenb[(Triggering player)] for (Triggering player)) == 4
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
Herolvl[0] >= 4
Then
Dialog - Set skillscreenb2[(Triggering player)][0] color to Green for (Player group((Triggering player)))
Variable - Set skilltxtlvl[(Picked player)][4] = "- - Required Level 2 - - "
Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][3] for (Player group((Triggering player)))
Variable - Set skillselect[(Triggering player)] = 3
Else
Dialog - Set skillscreenb2[(Triggering player)][0] color to Gray for (Player group((Triggering player)))
Variable - Set skilltxtlvl[(Picked player)][2] = "- - Required Level 4 - - "
Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][3] for (Player group((Triggering player)))
Variable - Set skillselect[(Triggering player)] = 0
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Selected list item of skillscreenb[(Triggering player)] for (Triggering player)) == 2
Then
Dialog - Set skillscreenb2[(Triggering player)][0] color to Green for (Player group((Triggering player)))
Variable - Set skilltxtlvl[(Picked player)][4] = "- - Required Level 0 - - "
Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][3] for (Player group((Triggering player)))
Variable - Set skillselect[(Triggering player)] = 4
Else

Skillbuy
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
(Used dialog item) == skillscreenb2[(Triggering player)][0]
skillp[(Triggering player)] >= 1
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
skillselect[(Triggering player)] == 1
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
Skill.lvl[(Triggering player)][1] == 0
Then
Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)
General - Skip remaining actions
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
Skill.lvl[(Triggering player)][1] == 1
Then
Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)
General - Skip remaining actions
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
Skill.lvl[(Triggering player)][1] == 2
Then
Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)
Dialog - Remove item 1 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))
Dialog - Set skillscreen2txt[(Triggering player)] text to "Click on a skill to view it." for (Player group((Triggering player)))
General - Skip remaining actions
Else
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
skillselect[(Triggering player)] == 4
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
Skill.lvl[(Triggering player)][4] == 0
Then
Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
Variable - Set Skill.lvl[(Triggering player)][4] = (Skill.lvl[(Triggering player)][4] + 1)
Unit - Add 1 Swift Feet to Hero[(Triggering player)] from Hero[(Triggering player)]
General - Skip remaining actions
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
Skill.lvl[(Triggering player)][4] == 1
Then
Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
Variable - Set Skill.lvl[(Triggering player)][4] = (Skill.lvl[(Triggering player)][4] + 1)
General - Skip remaining actions
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
Skill.lvl[(Triggering player)][4] == 2
Then
Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
Variable - Set Skill.lvl[(Triggering player)][4] = (Skill.lvl[(Triggering player)][4] + 1)
Dialog - Remove item 1 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))
Dialog - Set skillscreen2txt[(Triggering player)] text to "Click on a skill to view it." for (Player group((Triggering player)))
General - Skip remaining actions
Else
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
skillselect[(Triggering player)] == 2
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
Skill.lvl[(Triggering player)][2] == 0
Herolvl[(Triggering player)] >= 2
Then
Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
Variable - Set Skill.lvl[(Triggering player)][2] = (Skill.lvl[(Triggering player)][2] + 1)
Unit - Add 1 Gun Expert to Hero[(Triggering player)] from Hero[(Triggering player)]
General - Skip remaining actions
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
Skill.lvl[(Triggering player)][2] == 1
Herolvl[(Triggering player)] >= 2
Then
Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
Variable - Set Skill.lvl[(Triggering player)][2] = (Skill.lvl[(Triggering player)][2] + 1)
Unit - Add 1 AddGunE to Hero[(Triggering player)] from Hero[(Triggering player)]
Dialog - Remove item 2 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))
Dialog - Set skillscreen2txt[(Triggering player)] text to "Click on a skill to view it." for (Player group((Triggering player)))
General - Skip remaining actions
Else
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
skillselect[(Triggering player)] == 3
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
Skill.lvl[(Triggering player)][3] == 0
Herolvl[(Triggering player)] >= 4
Then
Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
Variable - Set Skill.lvl[(Triggering player)][3] = (Skill.lvl[(Triggering player)][3] + 1)
Unit - Add 1 Toughness to Hero[(Triggering player)] from Hero[(Triggering player)]
Dialog - Remove item 2 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))
Dialog - Set skillscreen2txt[(Triggering player)] text to "Click on a skill to view it." for (Player group((Triggering player)))
General - Skip remaining actions
Else
Else

P.S. If you would like to see the map to check the triggers out yourself and test it just PM me.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I don't have time to look over your code right now, but in the meantime, take your code and add it in wc3 tags to make it more readable.

Use
Trigger:
  • [/wc 3] (without the space)
    • Edit: I did it for you:
    • <div class="bbCodeSpoiler">
      • <button type="button" class="bbCodeSpoiler-button button" data-xf-click="toggle" data-xf-init="tooltip" title="Click to reveal or hide spoiler"><span class="button-text">
        • <span>Spoiler</span>
      • </span></button>
      • <div class="bbCodeSpoiler-content">
        • <div class="bbCodeBlock bbCodeBlock--spoiler">
          • <div class="bbCodeBlock-content"><div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_1">
    • <li class="lastopen"><span class="default">Create Char</span>
    • <ul>
    • <li class="open"><span class="events">Events</span>
    • <ul>
    • <li class="lasttree"><span class="game">Game - Player Any Player types a chat message containing &amp;quot;-new&amp;quot;, matching Exactly</span></li>
    • </ul>
    • </li>
    • <li class="tree"><span class="default">Local Variables</span></li>
    • <li class="open"><span class="conditions">Conditions</span>
    • <ul>
    • <li class="lasttree"><span class="default">(Number of Any units in (Unit group(Hero[(Triggering player)]))) == 0</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="actions">Actions</span>
    • <ul>
    • <li class="tree"><span class="unit">Unit - Create 1 Marine 2 for player 1 at (Center of (Entire map)) facing (Random angle) degrees (No Options)</span></li>
    • <li class="tree"><span class="default">Variable - Set Hero[(Triggering player)] = (Last created unit)</span></li>
    • <li class="tree"><span class="default">Variable - Set Heroweap[(Triggering player)] = 1</span></li>
    • <li class="lastopen"><span class="playergroup">Player Group - Pick each player in (Player group((Triggering player))) and do (Actions)</span>
    • <ul>
    • <li class="lastopen"><span class="actions">Actions</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skilltxtlvl[(Picked player)][1] = &amp;quot;- - Required Level 0 - - &amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxtlvl[(Picked player)][2] = &amp;quot;- - Required Level 2 - - &amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxtlvl[(Picked player)][3] = &amp;quot;- - Required Level 4 - - &amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxtlvl[(Picked player)][4] = &amp;quot;- - Required Level 0 - - &amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxt[(Picked player)][1] = (&amp;quot;- - Training - - &amp;quot; + (skilltxtlvl[(Picked player)][1] + &amp;quot;The Training skill adds two skill p...&amp;quot;))</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxt[(Picked player)][2] = (&amp;quot;- - Gun Expert - - &amp;quot; + (skilltxtlvl[(Picked player)][2] + &amp;quot;The Gun Expert skill adds 5% more d...&amp;quot;))</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxt[(Picked player)][3] = (&amp;quot;- - Toughness - - &amp;quot; + (skilltxtlvl[(Picked player)][3] + &amp;quot;The Toughness skill adds +1 armor a...&amp;quot;))</span></li>
    • <li class="lasttree"><span class="default">Variable - Set skilltxt[(Picked player)][4] = (&amp;quot;- - Swift Feet - - &amp;quot; + (skilltxtlvl[(Picked player)][4] + &amp;quot;The Swift Feet skill adds .5 moveme...&amp;quot;))</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </div></div></div>
      • </div>
      • </div>
    • </div>
    • <div class="bbCodeSpoiler">
      • <button type="button" class="bbCodeSpoiler-button button" data-xf-click="toggle" data-xf-init="tooltip" title="Click to reveal or hide spoiler"><span class="button-text">
        • <span>Spoiler</span>
      • </span></button>
      • <div class="bbCodeSpoiler-content">
        • <div class="bbCodeBlock bbCodeBlock--spoiler">
          • <div class="bbCodeBlock-content"><div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_2">
    • <li class="lastopen"><span class="default">ButtonIni</span>
    • <ul>
    • <li class="open"><span class="events">Events</span>
    • <ul>
    • <li class="lasttree"><span class="default">Timer - Elapsed time is 0.1 Real Time seconds</span></li>
    • </ul>
    • </li>
    • <li class="tree"><span class="default">Local Variables</span></li>
    • <li class="tree"><span class="conditions">Conditions</span></li>
    • <li class="lastopen"><span class="actions">Actions</span>
    • <ul>
    • <li class="tree"><span class="dialog">Dialog - Create a Modal dialog of size (150, 50) at (0, 25) relative to Top Left of screen</span></li>
    • <li class="tree"><span class="default">Variable - Set statdia = (Last created dialog)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a button for dialog (Last created dialog) with the dimensions (150, 50) anchored to Top Left with an offset of (0, 0) setting the tooltip to &amp;quot;Stat points are awarded every level...&amp;quot; with button text &amp;quot;Stats&amp;quot; and the hover image set to &amp;quot;&amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set statdia2 = (Last created dialog item)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a Modal dialog of size (150, 50) at (0, 80) relative to Top Left of screen</span></li>
    • <li class="tree"><span class="default">Variable - Set skilldia = (Last created dialog)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a button for dialog (Last created dialog) with the dimensions (150, 50) anchored to Top Left with an offset of (0, 0) setting the tooltip to &amp;quot;Skill points are awarded every even...&amp;quot; with button text &amp;quot;Skills&amp;quot; and the hover image set to &amp;quot;&amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set skilldia2 = (Last created dialog item)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a Modal dialog of size (480, 190) at (0, 0) relative to Center of screen</span></li>
    • <li class="tree"><span class="default">Variable - Set statscreen = (Last created dialog)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set title of statscreen to &amp;quot;Statistics&amp;quot;</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a button for dialog (Last created dialog) with the dimensions (100, 100) anchored to Bottom Left with an offset of (25, 50) setting the tooltip to &amp;quot;Skill points are awarded every even...&amp;quot; with button text &amp;quot;Perception&amp;quot; and the hover image set to &amp;quot;&amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set statscreenb[0] = (Last created dialog item)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a button for dialog (Last created dialog) with the dimensions (100, 100) anchored to Bottom Left with an offset of (135, 47) setting the tooltip to &amp;quot;Skill points are awarded every even...&amp;quot; with button text &amp;quot;Agility&amp;quot; and the hover image set to &amp;quot;&amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set statscreenb[1] = (Last created dialog item)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a button for dialog (Last created dialog) with the dimensions (100, 100) anchored to Bottom Left with an offset of (245, 45) setting the tooltip to &amp;quot;Skill points are awarded every even...&amp;quot; with button text &amp;quot;Endurance&amp;quot; and the hover image set to &amp;quot;&amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set statscreenb[2] = (Last created dialog item)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a button for dialog (Last created dialog) with the dimensions (100, 100) anchored to Bottom Left with an offset of (355, 43) setting the tooltip to &amp;quot;Skill points are awarded every even...&amp;quot; with button text &amp;quot;Intelligence&amp;quot; and the hover image set to &amp;quot;&amp;quot;</span></li>
    • <li class="tree"><span class="default">Variable - Set statscreenb[3] = (Last created dialog item)</span></li>
    • <li class="open"><span class="playergroup">Player Group - Pick each player in (Active Players) and do (Actions)</span>
    • <ul>
    • <li class="lastopen"><span class="actions">Actions</span>
    • <ul>
    • <li class="tree"><span class="dialog">Dialog - Create a Modal dialog of size (200, 100) at (0, 50) relative to Top Right of screen</span></li>
    • <li class="tree"><span class="default">Variable - Set Points[(Picked player)] = (Last created dialog)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a label for dialog (Last created dialog) with the dimensions (250, 75) anchored to Top Left with an offset of (25, 25) with the text (&amp;quot;Stat Points: &amp;quot; + (Text(statp[(Picked player)]))) color set to White text writeout set to False with a writeout duration of 2.0</span></li>
    • <li class="tree"><span class="default">Variable - Set statd[(Picked player)] = (Last created dialog item)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a label for dialog (Last created dialog) with the dimensions (250, 75) anchored to Top Left with an offset of (25, 50) with the text (&amp;quot;Skill Points: &amp;quot; + (Text(skillp[(Picked player)]))) color set to White text writeout set to False with a writeout duration of 2.0</span></li>
    • <li class="tree"><span class="default">Variable - Set skilld[(Picked player)] = (Last created dialog item)</span></li>
    • <li class="lasttree"><span class="dialog">Dialog - Show (Last created dialog) for (Player group((Picked player)))</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="playergroup">Player Group - Pick each player in (Active Players) and do (Actions)</span>
    • <ul>
    • <li class="lastopen"><span class="actions">Actions</span>
    • <ul>
    • <li class="tree"><span class="dialog">Dialog - Create a Modal dialog of size (350, 500) at (162, 0) relative to Center of screen</span></li>
    • <li class="tree"><span class="default">Variable - Set skillscreen[(Picked player)] = (Last created dialog)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set title of skillscreen[(Picked player)] to &amp;quot;Skills&amp;quot;</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a List Box for dialog (Last created dialog)</span></li>
    • <li class="tree"><span class="default">Variable - Set skillscreenb[(Picked player)] = (Last created dialog item)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set (Last created dialog item) size to (300, 375) for (All players)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Move (Last created dialog item) to (25, 75) relative to Top Left of dialog for (Player group((Picked player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Select item 0 of (Last created dialog item) for (All players)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Add list item &amp;quot;Training&amp;quot; to (Last created dialog item) for (Player group((Picked player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Add list item &amp;quot;Swift Feet&amp;quot; to (Last created dialog item) for (Player group((Picked player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Add list item &amp;quot;Gun Expert&amp;quot; to (Last created dialog item) for (Player group((Picked player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Add list item &amp;quot;Toughness&amp;quot; to (Last created dialog item) for (Player group((Picked player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a Modal dialog of size (350, 500) at (-162, 0) relative to Center of screen</span></li>
    • <li class="tree"><span class="default">Variable - Set skillscreen2[(Picked player)] = (Last created dialog)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create an image for dialog (Last created dialog) with the dimensions (300, 250) anchored to Top Left with an offset of (25, 25) setting the tooltip to &amp;quot;&amp;quot; using the image Assets\Textures\wireframe-terran-marine.dds as a Normal type with tiled set to False tint color Green and blend mode Normal</span></li>
    • <li class="tree"><span class="default">Variable - Set skillscreen2img[(Picked player)] = (Last created dialog item)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a label for dialog (Last created dialog) with the dimensions (300, 200) anchored to Top Left with an offset of (25, 275) with the text &amp;quot;Choose a skill to view it here.&amp;quot; color set to White text writeout set to False with a writeout duration of 2.0</span></li>
    • <li class="tree"><span class="default">Variable - Set skillscreen2txt[(Picked player)] = (Last created dialog item)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Create a button for dialog (Last created dialog) with the dimensions (150, 50) anchored to Bottom Left with an offset of (25, 25) setting the tooltip to &amp;quot;&amp;quot; with button text &amp;quot;Purchase&amp;quot; and the hover image set to &amp;quot;&amp;quot;</span></li>
    • <li class="lasttree"><span class="default">Variable - Set skillscreenb2[(Picked player)][0] = (Last created dialog item)</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </div></div></div>
      • </div>
      • </div>
    • </div>
    • <div class="bbCodeSpoiler">
      • <button type="button" class="bbCodeSpoiler-button button" data-xf-click="toggle" data-xf-init="tooltip" title="Click to reveal or hide spoiler"><span class="button-text">
        • <span>Spoiler</span>
      • </span></button>
      • <div class="bbCodeSpoiler-content">
        • <div class="bbCodeBlock bbCodeBlock--spoiler">
          • <div class="bbCodeBlock-content"><div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_3">
    • <li class="lastopen"><span class="default">Skillscreen</span>
    • <ul>
    • <li class="open"><span class="events">Events</span>
    • <ul>
    • <li class="lasttree"><span class="dialog">Dialog - Any Dialog Item is used by Player Any Player with event type Changed Selection</span></li>
    • </ul>
    • </li>
    • <li class="tree"><span class="default">Local Variables</span></li>
    • <li class="open"><span class="conditions">Conditions</span>
    • <ul>
    • <li class="lasttree"><span class="default">(Used dialog item) == skillscreenb[(Triggering player)]</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="actions">Actions</span>
    • <ul>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">(Selected list item of skillscreenb[(Triggering player)] for (Triggering player)) == 1</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreenb2[(Triggering player)][0] color to Green for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Triggering player)][1] for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">Variable - Set skillselect[(Triggering player)] = 1</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">(Selected list item of skillscreenb[(Triggering player)] for (Triggering player)) == 3</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="lastopen"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">Herolvl[0] &amp;gt;= 2</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreenb2[(Triggering player)][0] color to Green for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxtlvl[(Picked player)][2] = &amp;quot;- - Required Level 2 - - &amp;quot;</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][2] for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">Variable - Set skillselect[(Triggering player)] = 2</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="default">Else</span>
    • <ul>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreenb2[(Triggering player)][0] color to Gray for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxtlvl[(Picked player)][2] = &amp;quot;- - Required Level 2 - - &amp;quot;</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][2] for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">Variable - Set skillselect[(Triggering player)] = 2</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">(Selected list item of skillscreenb[(Triggering player)] for (Triggering player)) == 4</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="lastopen"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">Herolvl[0] &amp;gt;= 4</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreenb2[(Triggering player)][0] color to Green for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxtlvl[(Picked player)][4] = &amp;quot;- - Required Level 2 - - &amp;quot;</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][3] for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">Variable - Set skillselect[(Triggering player)] = 3</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="default">Else</span>
    • <ul>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreenb2[(Triggering player)][0] color to Gray for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxtlvl[(Picked player)][2] = &amp;quot;- - Required Level 4 - - &amp;quot;</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][3] for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">Variable - Set skillselect[(Triggering player)] = 0</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">(Selected list item of skillscreenb[(Triggering player)] for (Triggering player)) == 2</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreenb2[(Triggering player)][0] color to Green for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="default">Variable - Set skilltxtlvl[(Picked player)][4] = &amp;quot;- - Required Level 0 - - &amp;quot;</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to skilltxt[(Picked player)][3] for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">Variable - Set skillselect[(Triggering player)] = 4</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </div></div></div>
      • </div>
      • </div>
    • </div>
    • <div class="bbCodeSpoiler">
      • <button type="button" class="bbCodeSpoiler-button button" data-xf-click="toggle" data-xf-init="tooltip" title="Click to reveal or hide spoiler"><span class="button-text">
        • <span>Spoiler</span>
      • </span></button>
      • <div class="bbCodeSpoiler-content">
        • <div class="bbCodeBlock bbCodeBlock--spoiler">
          • <div class="bbCodeBlock-content"><div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_4">
    • <li class="lastopen"><span class="default">Skillbuy</span>
    • <ul>
    • <li class="open"><span class="events">Events</span>
    • <ul>
    • <li class="lasttree"><span class="dialog">Dialog - Any Dialog Item is used by Player Any Player with event type Clicked</span></li>
    • </ul>
    • </li>
    • <li class="tree"><span class="default">Local Variables</span></li>
    • <li class="open"><span class="conditions">Conditions</span>
    • <ul>
    • <li class="tree"><span class="default">(Used dialog item) == skillscreenb2[(Triggering player)][0]</span></li>
    • <li class="lasttree"><span class="default">skillp[(Triggering player)] &amp;gt;= 1</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="actions">Actions</span>
    • <ul>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">skillselect[(Triggering player)] == 1</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">Skill.lvl[(Triggering player)][1] == 0</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)</span></li>
    • <li class="tree"><span class="default">Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)</span></li>
    • <li class="tree"><span class="default">Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)</span></li>
    • <li class="lasttree"><span class="default">General - Skip remaining actions</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">Skill.lvl[(Triggering player)][1] == 1</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)</span></li>
    • <li class="tree"><span class="default">Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)</span></li>
    • <li class="tree"><span class="default">Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)</span></li>
    • <li class="lasttree"><span class="default">General - Skip remaining actions</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">Skill.lvl[(Triggering player)][1] == 2</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)</span></li>
    • <li class="tree"><span class="default">Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)</span></li>
    • <li class="tree"><span class="default">Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Remove item 1 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to &amp;quot;Click on a skill to view it.&amp;quot; for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">General - Skip remaining actions</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">skillselect[(Triggering player)] == 4</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">Skill.lvl[(Triggering player)][4] == 0</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)</span></li>
    • <li class="tree"><span class="default">Variable - Set Skill.lvl[(Triggering player)][4] = (Skill.lvl[(Triggering player)][4] + 1)</span></li>
    • <li class="tree"><span class="unit">Unit - Add 1 Swift Feet to Hero[(Triggering player)] from Hero[(Triggering player)]</span></li>
    • <li class="lasttree"><span class="default">General - Skip remaining actions</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">Skill.lvl[(Triggering player)][4] == 1</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)</span></li>
    • <li class="tree"><span class="default">Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)</span></li>
    • <li class="tree"><span class="default">Variable - Set Skill.lvl[(Triggering player)][4] = (Skill.lvl[(Triggering player)][4] + 1)</span></li>
    • <li class="lasttree"><span class="default">General - Skip remaining actions</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">Skill.lvl[(Triggering player)][4] == 2</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)</span></li>
    • <li class="tree"><span class="default">Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)</span></li>
    • <li class="tree"><span class="default">Variable - Set Skill.lvl[(Triggering player)][4] = (Skill.lvl[(Triggering player)][4] + 1)</span></li>
    • <li class="tree"><span class="dialog">Dialog - Remove item 1 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to &amp;quot;Click on a skill to view it.&amp;quot; for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">General - Skip remaining actions</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">skillselect[(Triggering player)] == 2</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="open"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="tree"><span class="default">Skill.lvl[(Triggering player)][2] == 0</span></li>
    • <li class="lasttree"><span class="default">Herolvl[(Triggering player)] &amp;gt;= 2</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)</span></li>
    • <li class="tree"><span class="default">Variable - Set Skill.lvl[(Triggering player)][2] = (Skill.lvl[(Triggering player)][2] + 1)</span></li>
    • <li class="tree"><span class="unit">Unit - Add 1 Gun Expert to Hero[(Triggering player)] from Hero[(Triggering player)]</span></li>
    • <li class="lasttree"><span class="default">General - Skip remaining actions</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="tree"><span class="default">Skill.lvl[(Triggering player)][2] == 1</span></li>
    • <li class="lasttree"><span class="default">Herolvl[(Triggering player)] &amp;gt;= 2</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)</span></li>
    • <li class="tree"><span class="default">Variable - Set Skill.lvl[(Triggering player)][2] = (Skill.lvl[(Triggering player)][2] + 1)</span></li>
    • <li class="tree"><span class="unit">Unit - Add 1 AddGunE to Hero[(Triggering player)] from Hero[(Triggering player)]</span></li>
    • <li class="tree"><span class="dialog">Dialog - Remove item 2 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to &amp;quot;Click on a skill to view it.&amp;quot; for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">General - Skip remaining actions</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • <li class="lastopen"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="lasttree"><span class="default">skillselect[(Triggering player)] == 3</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="lastopen"><span class="default">General - If (Conditions) then do (Actions) else do (Actions)</span>
    • <ul>
    • <li class="open"><span class="default">If</span>
    • <ul>
    • <li class="tree"><span class="default">Skill.lvl[(Triggering player)][3] == 0</span></li>
    • <li class="lasttree"><span class="default">Herolvl[(Triggering player)] &amp;gt;= 4</span></li>
    • </ul>
    • </li>
    • <li class="open"><span class="default">Then</span>
    • <ul>
    • <li class="tree"><span class="default">Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)</span></li>
    • <li class="tree"><span class="default">Variable - Set Skill.lvl[(Triggering player)][3] = (Skill.lvl[(Triggering player)][3] + 1)</span></li>
    • <li class="tree"><span class="unit">Unit - Add 1 Toughness to Hero[(Triggering player)] from Hero[(Triggering player)]</span></li>
    • <li class="tree"><span class="dialog">Dialog - Remove item 2 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))</span></li>
    • <li class="tree"><span class="dialog">Dialog - Set skillscreen2txt[(Triggering player)] text to &amp;quot;Click on a skill to view it.&amp;quot; for (Player group((Triggering player)))</span></li>
    • <li class="lasttree"><span class="default">General - Skip remaining actions</span></li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • <li class="lasttree"><span class="default">Else</span></li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </li>
    • </ul>
    • </div></div></div>
      • </div>
      • </div>
    • </div>
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
are you getting the too many strings error when the trigger is supposed to fire?
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Okay so I've read through the code and my first thought is that there has to be some better way to do this. I mean, this is just so much code for a relatively simple system.

While I can't really find the error before I know how you want it to work(It would help if I had the map, I PMed you about it), I found some things that you can do to simplify it, although it requires some work.

First of all, you're creating 3 + 3 * (Number of active players). If you have 5 players, this means 18 dialogs. While the game might not lag, it's ugly.

In ButtonIni you have two "Pick every player" loops right after eachother. Why not combine them into a single one? Well, you shouldn't even create the things in the player loop. Right now you're creating separate dialogs for each player just so you can have different text for the players. You can do this in a single dialog. If you create a single dialog for all players and then create an empty label for it you can then in your "Pick every player" loop set the text to the correct text for the correct player.

This means "Points", "skillscreen" and "skillscreen2" doesn't have to be arrays.

You're mentioning that the dialog opens but doesn't close. I don't see why it would close. You don't have any action that hides it anywhere that I can find.

I don't know the problem you're having with the list. One of the things I noticed is the abundance of "Skip remaining actions". I generally try to avoid them as much as possible. Are you doing because it's necessary or because you want to make it effective so it skips the rest of the if-checks? If you're only doing it for effectiveness only, try removing all of those.

You say you're only able to select the first skill. Does this mean that when you open the list by pressing on it and press the second item for example, it keeps having the first item selected in the list.

Or maybe the list properly selects the item you select but your labels and such are not updating correctly?

Which one of these are the case?

Do you actually need the variable skillselect? I mean, you can already check which list item is selected for a specific player.

Also, look at this code:
Trigger:
  • General - If (Conditions) then do (Actions) else do (Actions)
    • If
      • Skill.lvl[(Triggering player)][1] == 0
    • Then
      • Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
      • Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
      • Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)
      • General - Skip remaining actions
    • Else


Trigger:
  • General - If (Conditions) then do (Actions) else do (Actions)
    • If
      • Skill.lvl[(Triggering player)][1] == 1
    • Then
      • Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
      • Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
      • Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)
      • General - Skip remaining actions
    • Else

Do you see some similarities? They're the same! It doesn't matter if Skill.lvl[(Triggering player)][1] is 1 or 0, you can just skip the if-then-else.

I think you should be able to substitute this code:
Trigger:
  • General - If (Conditions) then do (Actions) else do (Actions)
    • If
      • Skill.lvl[(Triggering player)][1] == 0
    • Then
      • Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
      • Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
      • Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)
      • General - Skip remaining actions
    • Else
    • General - If (Conditions) then do (Actions) else do (Actions)
      • If
        • Skill.lvl[(Triggering player)][1] == 1
      • Then
        • Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
        • Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
        • Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)
        • General - Skip remaining actions
      • Else
    • General - If (Conditions) then do (Actions) else do (Actions)
      • If
        • Skill.lvl[(Triggering player)][1] == 2
      • Then
        • Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
        • Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
        • Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)
        • Dialog - Remove item 1 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))
        • Dialog - Set skillscreen2txt[(Triggering player)] text to &quot;Click on a skill to view it.&quot; for (Player group((Triggering player)))
        • General - Skip remaining actions
      • Else

with
Trigger:
  • Variable - Set skillp[(Triggering player)] = (skillp[(Triggering player)] - 1)
    • Variable - Set statp[(Triggering player)] = (statp[(Triggering player)] + 2)
    • Variable - Set Skill.lvl[(Triggering player)][1] = (Skill.lvl[(Triggering player)][1] + 1)
    • General - If (Conditions) then do (Actions) else do (Actions)
      • If
        • Skill.lvl[(Triggering player)][1] == 2
      • Then
        • Dialog - Remove item 1 from skillscreenb[(Triggering player)] for (Player group((Triggering player)))
        • Dialog - Set skillscreen2txt[(Triggering player)] text to &quot;Click on a skill to view it.&quot; for (Player group((Triggering player)))
        • General - Skip remaining actions
      • Else
 

Fire-Wolf

S.P.D Smoke Pot Daily, Legalize It!
Reaction score
54
You have a good point, one dialog for every player would make a lot more sense. Also your right, I didnt realize that it was the same, your trigger is much simpler for the same outcome. I will attempt on making the triggers simpler to see if I can find what is wrong. When I select the second, or any other the skill the description goes blank, however the buttons change color. And to the other post there are error's at the begining of the game, these may be the string errors you were talking about.
 
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