Need help fixing .omg's Moded stat system, +Rep will be given
So i asked .omg if i could mod his stat system to fix my liking and he had said yes so what i did was I Created this Dialog, with 4 options, str, int, agi, cancel.
What i need Help with is
-When you hit ESC it shows how many stat points you have in dialog box
-When you spend a point it deducts it from the dialog and shows the new available stat points
-Does not glitch out rapidly clicking esc
-Does not glitch out dieing while putting stats in
Problems with this Dialog button
-Rapidly press ESC, stat system breaks
-Die while doing stat points, Stat system yet again breaks
Here are the codes
So i asked .omg if i could mod his stat system to fix my liking and he had said yes so what i did was I Created this Dialog, with 4 options, str, int, agi, cancel.
What i need Help with is
-When you hit ESC it shows how many stat points you have in dialog box
-When you spend a point it deducts it from the dialog and shows the new available stat points
-Does not glitch out rapidly clicking esc
-Does not glitch out dieing while putting stats in
Problems with this Dialog button
-Rapidly press ESC, stat system breaks
-Die while doing stat points, Stat system yet again breaks
Here are the codes
-
Stats Ini
-
Events
-
Map intialization
-
-
Conditions
-
none
-
-
Actions
-
Set MaxPlayersCount = 10
-
Set Stats_UnitType=____
-
-----count of unspent points when lvlup------
-
For each (Integer Index)from 1 to MaxPlayersCount, do (actions)
-
Loop - Actions
-
Set UnsuspentSP[index] = UP_Number
-
Set HeroLevel[index] = 1
-
-
Set Stats_Text[1] = |c00FF0000Strength|r :
-
Set Stats_Text[2] = |c0017CB33Agility|r :
-
Set Stats_Text[3] = |c001407A6intelligence|r :
-
-
-
Selection Clearing
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
UnsuspentSP[(Player number of (Triggering player))] Greater than 0
-
Stats_Hero[(Player number of (Triggering player))] Not equal to No unit
-
(Stats_Hero[(Player number of (Triggering player))] is alive) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to DialogButton[1]
-
-
Then - Actions
-
Set HeroStr[(Player number of (Triggering player))] = ((Strength of Stats_Hero[(Player number of (Triggering player))] (Exclude bonuses)) + 1)
-
Floating Text - Change text of Str_Floating_Text[(Player number of (Triggering player))] to (String(HeroStr[(Player number of (Triggering player))])) using font size Stats_Size
-
-------- - --------
-
Hero - Modify Strength of Stats_Hero[(Player number of (Triggering player))]: Add 1
-
Special Effect - Create a special effect attached to the PointSP of Stats_Hero[(Player number of (Triggering player))] using StrSP
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to DialogButton[2]
-
-
Then - Actions
-
Set HeroAg[(Player number of (Triggering player))] = ((Agility of Stats_Hero[(Player number of (Triggering player))] (Exclude bonuses)) + 1)
-
Floating Text - Change text of Ag_Floating_Text[(Player number of (Triggering player))] to (String(HeroAg[(Player number of (Triggering player))])) using font size Stats_Size
-
-------- - --------
-
Hero - Modify Agility of Stats_Hero[(Player number of (Triggering player))]: Add 1
-
Special Effect - Create a special effect attached to the PointSP of Stats_Hero[(Player number of (Triggering player))] using AgSP
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to DialogButton[3]
-
-
Then - Actions
-
Set HeroInt[(Player number of (Triggering player))] = ((Intelligence of Stats_Hero[(Player number of (Triggering player))] (Exclude bonuses)) + 1)
-
Floating Text - Change text of Int_Floating_Text[(Player number of (Triggering player))] to (String(HeroInt[(Player number of (Triggering player))])) using font size Stats_Size
-
-------- - --------
-
Hero - Modify Intelligence of Stats_Hero[(Player number of (Triggering player))]: Add 1
-
Special Effect - Create a special effect attached to the PointSP of Stats_Hero[(Player number of (Triggering player))] using IntSP
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to DialogButton[4]
-
-
Then - Actions
-
Dialog - Hide MyDialog for (Triggering player)
-
-
Else - Actions
-
-
Set UnsuspentSP[(Player number of (Triggering player))] = (UnsuspentSP[(Player number of (Triggering player))] - 1)
-
Floating Text - Change text of Floating_Text_Array_Unsuspent[(Player number of (Triggering player))] to (String(UnsuspentSP[(Player number of (Triggering player))])) using font size UnspentSize
-
-------- - --------
-
Skip remaining actions
-
-
Else - Actions
-
-
ESC Selection
-
Events
-
Player - Player 1 (Red) skips a cinematic sequence
-
Player - Player 2 (Blue) skips a cinematic sequence
-
Player - Player 3 (Teal) skips a cinematic sequence
-
Player - Player 4 (Purple) skips a cinematic sequence
-
Player - Player 5 (Yellow) skips a cinematic sequence
-
Player - Player 6 (Orange) skips a cinematic sequence
-
Player - Player 7 (Green) skips a cinematic sequence
-
Player - Player 8 (Pink) skips a cinematic sequence
-
Player - Player 9 (Gray) skips a cinematic sequence
-
Player - Player 10 (Light Blue) skips a cinematic sequence
-
-
Conditions
-
Actions
-
Wait 0.03 seconds
-
Dialog - Clear MyDialog
-
Dialog - Change the title of MyDialog to Upgrade Stats
-
Dialog - Create a dialog button for MyDialog labelled Str
-
Set DialogButton[1] = (Last created dialog Button)
-
Dialog - Create a dialog button for MyDialog labelled Agi
-
Set DialogButton[2] = (Last created dialog Button)
-
Dialog - Create a dialog button for MyDialog labelled Int
-
Set DialogButton[3] = (Last created dialog Button)
-
Dialog - Create a dialog button for MyDialog labelled Cancel
-
Set DialogButton[4] = (Last created dialog Button)
-
Dialog - Show MyDialog for (Triggering player)
-
-
Last edited: