Event:
Unit gains a level
Condidtion:
Triggering unit is A Hero Equal to True
Action:
Turn on Hero Attribute Dialog Buttons
Set The_Hero Eual to Triggering unit
Event:
Player - Player 1 (Red) skips a cinematic sequence
Condidtion:
None
Action:
Clear Hero_Attribute
Create a dialog button for Hero_Attribute labelled Hero Strength
Create a dialog button for Hero_Attribute labelled Hero Agility
Create a dialog button for Hero_Attribute labelled Hero Intelligence
Change the title of Hero_Attribute to Hero Attribute Points
Show Hero_Attribute
Event:
Dialog - A dialog button is clicked for Hero_Attribute
Condition:
(Clicked dialog button) Equal to Str
Action:
Set Strength of (The_Hero) to ((Strength of The_Hero (Exclude bonuses)) + 1 ), (Permanent or Temporary: Permanent)
Hero Gain A Level
Events
Unit - A unit Gains a level
Conditions
((Leveling Hero) is A Hero) Equal to True
Actions
Trigger - Turn on Hero Attribute Dialog Buttons <gen>
Set The_Leveling_Hero = (Leveling Hero)
Set Hero_Spent_Point = (Hero_Spent_Point + 1)
Hero Attribute Dialog Buttons
Events
Player - Player 1 (Red) skips a cinematic sequence
Conditions
Actions
Game - Display to (All players) for 10.00 seconds the text: (You have + ((String(Hero_Spent_Point)) + Points Left))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Hero_Spent_Point Greater than or equal to 1
Then - Actions
Dialog - Clear Hero_Attribute
Dialog - Create a dialog button for Hero_Attribute labelled Increase Hero Stren...
Set Strength = (Last created dialog Button)
Dialog - Create a dialog button for Hero_Attribute labelled Increase Hero Agili...
Set Agility = (Last created dialog Button)
Dialog - Create a dialog button for Hero_Attribute labelled Increase Hero Intel...
Set Intelligence = (Last created dialog Button)
Dialog - Change the title of Hero_Attribute to (String(Hero_Spent_Point))
Dialog - Show Hero_Attribute for (Owner of The_Leveling_Hero)
Else - Actions
Do nothing
Str
Events
Dialog - A dialog button is clicked for Hero_Attribute
Conditions
(Clicked dialog button) Equal to Strength
Actions
Set Hero_Spent_Point = (Hero_Spent_Point - 1)
Hero - Modify Strength of The_Leveling_Hero: Add 1
Agi
Events
Dialog - A dialog button is clicked for Hero_Attribute
Conditions
(Clicked dialog button) Equal to Agility
Actions
Set Hero_Spent_Point = (Hero_Spent_Point - 1)
Hero - Modify Agility of The_Leveling_Hero: Add 1
Int
Events
Dialog - A dialog button is clicked for Hero_Attribute
Conditions
(Clicked dialog button) Equal to Intelligence
Actions
Set Hero_Spent_Point = (Hero_Spent_Point - 1)
Hero - Modify Intelligence of The_Leveling_Hero: Add 1
Gain Level Command
Events
Player - Player 1 (Red) types a chat message containing -level up as An exact match
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + 1), Show level-up graphics)
Creating dialog
Events
Map initialization
Conditions
Actions
Clear Dlg_HeroStats
Create a dialog button for Dlg_HeroStats labelled +STR
Set Btn_HeroStats_STR = (Last created dialog Button)
Create a dialog button for Dlg_HeroStats labelled +AGI
Set Btn_HeroStats_AGI = (Last created dialog Button)
Create a dialog button for Dlg_HeroStats labelled +INT
Set Btn_HeroStats_INT = (Last created dialog Button)
Create a dialog button for Dlg_HeroStats labelled Cancel
Set Btn_HeroStats_CANCEL = (Last created dialog Button)
Leveling
Events
A Hero levels
Conditions
Actions
Set custom value of (Leveling Hero) to (Custom value of (Leveling Hero) + 1)
Showing dialog
Events
Player 1 skipped a cinematic
...
Conditions
Actions
If (Custom value of Hero[Player number of (Triggering player)]) equal to 0 then
Game - Display to Triggering Player the text Your hero can't raise attributes yet
Else
Show Dlg_HeroStats for Triggering Player
Events
A dialog button is clicked for Dlg_HeroStats
Conditions
Actions
If (Clicked dialog button) equal to Btn_HeroStats_CANCEL then
Skip remaining actions
Set TmpUnit = Hero[Player number of (Triggering player)]
If (Clicked dialog button) equal to Btn_HeroStats_STR then
Hero - Modify Strength of TmpUnit: Add 1
If (Clicked dialog button) equal to Btn_HeroStats_AGI then
Hero - Modify Agility of TmpUnit: Add 1
If (Clicked dialog button) equal to Btn_HeroStats_INT then
Hero - Modify Intelligence of TmpUnit: Add 1
Set custom value of (TmpUnit) to (Custom value of (TmpUnit) - 1)