Hello, and please excuse the poor title name!
So for today, I need help with what I think might be a simple problem that I just can't see.
When I'm finished adding stats via my stat system, it somehow gives me an extra number of points.
For instance, if I level three times, I am granted with 15 APs (Attribute Points). That's 5 per level. Now, when I go in and actually spend the points via the system, when I get down to 0 points, it does what it is supposed to do, and not allow you to add anymore points (It's not...perfect, unfortunately, but basically, it simply won't add more to your stats when you click the buttons). The problem is after that, when I check the APs remaining, after I have spent all 15 of them, it comes up saying I have 1 remaining. When I open the menu back up, it indeed says I have 1, and I can spend that 1 point indefinitely this way.
I'm not sure where this comes from. Anyway, I know this is probably the most fucked up attempt at making triggers you've about ever seen, but I'm not claiming to be any good with these stupid things. Here's the system. You'll notice there's a lot of unused/unnecessary stuff in there, cause I haven't finished cleaning it up yet (Since it's not working perfectly, and this is the result of many different experiments to get this right). Couple of things will be changed later on, some of which I'll explain as I post the triggers.
Please do be nice. I'm absolutely terrible with this. I HATE triggers, but since I don't have any trigger help, I'm having to do this myself.
EDIT: Somehow in a 11 hour period of time, without being touched, the system fucked up and other things simply aren't working now, that weren't causing problems last night.
As I'm sure you'll notice... I write EVERYTHING down so i don't forget what shit is for. I have half a dozen comment triggers in between explaining every aspect of everything so I can pick it up in 6 years if I needed to. If I don't, I'll forget later and I'll be pissed off for not remembering. So, those are simply for my own personal amusement.
Anyway, as per always, I abide by my signature. Also, another shameless advertisement... If I had a Triggerer helping me with my project, these issues wouldn't be happening, and the demo would be released MUCH sooner. More details in the signature. Clicky! <3
So for today, I need help with what I think might be a simple problem that I just can't see.
When I'm finished adding stats via my stat system, it somehow gives me an extra number of points.
For instance, if I level three times, I am granted with 15 APs (Attribute Points). That's 5 per level. Now, when I go in and actually spend the points via the system, when I get down to 0 points, it does what it is supposed to do, and not allow you to add anymore points (It's not...perfect, unfortunately, but basically, it simply won't add more to your stats when you click the buttons). The problem is after that, when I check the APs remaining, after I have spent all 15 of them, it comes up saying I have 1 remaining. When I open the menu back up, it indeed says I have 1, and I can spend that 1 point indefinitely this way.
I'm not sure where this comes from. Anyway, I know this is probably the most fucked up attempt at making triggers you've about ever seen, but I'm not claiming to be any good with these stupid things. Here's the system. You'll notice there's a lot of unused/unnecessary stuff in there, cause I haven't finished cleaning it up yet (Since it's not working perfectly, and this is the result of many different experiments to get this right). Couple of things will be changed later on, some of which I'll explain as I post the triggers.
Please do be nice. I'm absolutely terrible with this. I HATE triggers, but since I don't have any trigger help, I'm having to do this myself.

EDIT: Somehow in a 11 hour period of time, without being touched, the system fucked up and other things simply aren't working now, that weren't causing problems last night.
In this first trigger, you'll note the Unit-type variables, they're uncleaned experiments. You'll see them throughout the system as well. Ignore those.
This is just a temp method of checking APs till I set up the multiboard. Added for sake of completion.
This next one I'm only going to show one of them, since they're all the same with the only difference being the different stats.
For the record, there's a noticeable lack in tuts for making Dialogs. The one that there is only shows the most basic of dialogs (One menu with 2 simple buttons). And I was quite annoyed when trying to figure out how to get submenus in there!
-
Ability Points
-
Events
-
Time - Elapsed game time is 0.00 seconds
-
-
Conditions
-
Actions
-
Set AP_Hero[1] = (Units of type 1)
-
Set AP_Hero[2] = (Units of type 2)
-
Set AP_Hero[3] = (Units of type 3)
-
Set AP_Hero[4] = (Units of type 4)
-
Set AP_Hero[5] = (Units of type 5)
-
Set AP_Counter[1] = 0
-
Set AP_Counter[2] = 0
-
Set AP_Counter[3] = 0
-
Set AP_Counter[4] = 0
-
Set AP_Counter[5] = 0
-
-------- vvv --- This is a test function. Don't forget to remove. --- vvv --------
-
Set Player_Heroes[1] = Blademaster 0040 <gen>
-
-
-
Receive AP
-
Events
-
Unit - A unit Gains a level
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to (==) True
-
-
Actions
-
-------- --- --------
-
-------- vvv --- THIS IS FOR TESTING ONLY. REMOVE BEFORE RELEASE. --- vvv --------
-
-------- --- --------
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Equal to (==) Player_Heroes[1]
-
-
Then - Actions
-
Set AP_Counter[1] = (AP_Counter[1] + 5)
-
-
Else - Actions
-
-
-
-------- --- --------
-
-------- ^^^ --- Above is for testing purposes. --- ^^^ --------
-
-------- --- --------
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Equal to (==) (Random unit from AP_Hero[1])
-
-
Then - Actions
-
Set AP_Counter[1] = (AP_Counter[1] + 5)
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Equal to (==) (Random unit from AP_Hero[2])
-
-
Then - Actions
-
Set AP_Counter[2] = (AP_Counter[2] + 5)
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Equal to (==) (Random unit from AP_Hero[3])
-
-
Then - Actions
-
Set AP_Counter[3] = (AP_Counter[3] + 5)
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Equal to (==) (Random unit from AP_Hero[4])
-
-
Then - Actions
-
Set AP_Counter[4] = (AP_Counter[4] + 5)
-
-
Else - Actions
-
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Equal to (==) (Random unit from AP_Hero[5])
-
-
Then - Actions
-
Set AP_Counter[5] = (AP_Counter[5] + 5)
-
-
Else - Actions
-
-
-
-
This is just a temp method of checking APs till I set up the multiboard. Added for sake of completion.
-
Check APs
-
Events
-
Player - Player 1 (Red) types a chat message containing -APs as An exact match
-
-
Conditions
-
Actions
-
Game - Display to (All players) the text: (1's APs: |cffffcc00 + ((String(AP_Counter[1])) + |r.))
-
Game - Display to (All players) the text: (2's APs: |cffffcc00 + ((String(AP_Counter[2])) + |r.))
-
Game - Display to (All players) the text: (3's APs: |cffffcc00 + ((String(AP_Counter[3])) + |r.))
-
Game - Display to (All players) the text: (4's APs: |cffffcc00 + ((String(AP_Counter[4])) + |r.))
-
Game - Display to (All players) the text: (5's APs: |cffffcc00 + ((String(AP_Counter[5])) + |r.))
-
-
-
Setup Dialog
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to (==) Ability Points
-
-
Actions
-
Set AP_Caster = (Triggering unit)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AP_Caster Equal to (==) (Random unit from AP_Hero[1])
-
-
Then - Actions
-
Set AP_Counter2 = AP_Counter[1]
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AP_Caster Equal to (==) (Random unit from AP_Hero[2])
-
-
Then - Actions
-
Set AP_Counter2 = AP_Counter[2]
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AP_Caster Equal to (==) (Random unit from AP_Hero[3])
-
-
Then - Actions
-
Set AP_Counter2 = AP_Counter[3]
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AP_Caster Equal to (==) (Random unit from AP_Hero[4])
-
-
Then - Actions
-
Set AP_Counter2 = AP_Counter[4]
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AP_Caster Equal to (==) (Random unit from AP_Hero[5])
-
-
Then - Actions
-
Set AP_Counter2 = AP_Counter[5]
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AP_Caster Equal to (==) Player_Heroes[1]
-
-
Then - Actions
-
-------- This IF/THEN/ELSE is strictly for testing purposes. Remove before release. --------
-
Set AP_Counter2 = AP_Counter[1]
-
-
Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-
-
Dialog - Clear AP_Dialog[1]
-
Dialog - Change the title of AP_Dialog[1] to (APs: |cFFFFCC00 + ((String(AP_Counter2)) + |r. Choose stat to modify.))
-
Dialog - Create a dialog button for AP_Dialog[1] labelled Stamina
-
Set AP_DialogStats[1] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[1] labelled Strength
-
Set AP_DialogStats[2] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[1] labelled Intellect
-
Set AP_DialogStats[3] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[1] labelled Close
-
Set AP_DialogStats[4] = (Last created dialog Button)
-
Dialog - Show AP_Dialog[1] for Player 1 (Red)
-
-
-
Choose Stat
-
Events
-
Dialog - A dialog button is clicked for AP_Dialog[1]
-
-
Conditions
-
Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogStats[1]
-
-
Then - Actions
-
Dialog - Clear AP_Dialog[2]
-
Dialog - Change the title of AP_Dialog[2] to (APs: |cFFFFCC00 + ((String(AP_Counter2)) + |r. Increase Stamina by how much?))
-
Dialog - Create a dialog button for AP_Dialog[2] labelled +1
-
Set AP_DialogAdd[1] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[2] labelled +2
-
Set AP_DialogAdd[2] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[2] labelled +3
-
Set AP_DialogAdd[3] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[2] labelled +4
-
Set AP_DialogAdd[4] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[2] labelled +5
-
Set AP_DialogAdd[5] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[2] labelled Return
-
Set AP_DialogAdd[6] = (Last created dialog Button)
-
Dialog - Show AP_Dialog[2] for Player 1 (Red)
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogStats[2]
-
-
Then - Actions
-
Dialog - Clear AP_Dialog[3]
-
Dialog - Change the title of AP_Dialog[3] to (APs: |cFFFFCC00 + ((String(AP_Counter2)) + |r. Increase Strength by how much?))
-
Dialog - Create a dialog button for AP_Dialog[3] labelled +1
-
Set AP_DialogAdd[1] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[3] labelled +2
-
Set AP_DialogAdd[2] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[3] labelled +3
-
Set AP_DialogAdd[3] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[3] labelled +4
-
Set AP_DialogAdd[4] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[3] labelled +5
-
Set AP_DialogAdd[5] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[3] labelled Return
-
Set AP_DialogAdd[6] = (Last created dialog Button)
-
Dialog - Show AP_Dialog[3] for Player 1 (Red)
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogStats[3]
-
-
Then - Actions
-
Dialog - Clear AP_Dialog[4]
-
Dialog - Change the title of AP_Dialog[4] to (APs: |cFFFFCC00 + ((String(AP_Counter2)) + |r. Increase Intellect by how much?))
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +1
-
Set AP_DialogAdd[1] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +2
-
Set AP_DialogAdd[2] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +3
-
Set AP_DialogAdd[3] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +4
-
Set AP_DialogAdd[4] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +5
-
Set AP_DialogAdd[5] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled Return
-
Set AP_DialogAdd[6] = (Last created dialog Button)
-
Dialog - Show AP_Dialog[4] for Player 1 (Red)
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogStats[4]
-
-
Then - Actions
-
Dialog - Hide AP_Dialog[1] for Player 1 (Red)
-
-
Else - Actions
-
-
-
-
-
-
-
-
Dialog - Clear AP_Dialog[1]
-
-
This next one I'm only going to show one of them, since they're all the same with the only difference being the different stats.
-
Intellect Increase
-
Events
-
Dialog - A dialog button is clicked for AP_Dialog[4]
-
-
Conditions
-
Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogAdd[1]
-
AP_Counter2 Greater than or equal to (>=) 1
-
-
Then - Actions
-
Hero - Modify Intelligence of AP_Caster: Add 1
-
Set AP_Counter2 = (AP_Counter2 - 1)
-
Set AP_Counter[AP_Counter2] = AP_Counter2
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogAdd[2]
-
AP_Counter2 Greater than or equal to (>=) 2
-
-
Then - Actions
-
Hero - Modify Intelligence of AP_Caster: Add 2
-
Set AP_Counter2 = (AP_Counter2 - 2)
-
Set AP_Counter[AP_Counter2] = AP_Counter2
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogAdd[3]
-
AP_Counter2 Greater than or equal to (>=) 3
-
-
Then - Actions
-
Hero - Modify Intelligence of AP_Caster: Add 3
-
Set AP_Counter2 = (AP_Counter2 - 3)
-
Set AP_Counter[AP_Counter2] = AP_Counter2
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogAdd[4]
-
AP_Counter2 Greater than or equal to (>=) 4
-
-
Then - Actions
-
Hero - Modify Intelligence of AP_Caster: Add 4
-
Set AP_Counter2 = (AP_Counter2 - 4)
-
Set AP_Counter[AP_Counter2] = AP_Counter2
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogAdd[5]
-
AP_Counter2 Greater than or equal to (>=) 5
-
-
Then - Actions
-
Hero - Modify Intelligence of AP_Caster: Add 5
-
Set AP_Counter2 = (AP_Counter2 - 5)
-
Set AP_Counter[AP_Counter2] = AP_Counter2
-
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to (==) AP_DialogAdd[6]
-
-
Then - Actions
-
Dialog - Clear AP_Dialog[1]
-
Dialog - Change the title of AP_Dialog[1] to (APs: |cFFFFCC00 + ((String(AP_Counter2)) + |r. Choose stat to modify.))
-
Dialog - Create a dialog button for AP_Dialog[1] labelled Stamina
-
Set AP_DialogStats[1] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[1] labelled Strength
-
Set AP_DialogStats[2] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[1] labelled Intellect
-
Set AP_DialogStats[3] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[1] labelled Close
-
Set AP_DialogStats[4] = (Last created dialog Button)
-
Dialog - Hide AP_Dialog[4] for Player 1 (Red)
-
Dialog - Show AP_Dialog[1] for Player 1 (Red)
-
Skip remaining actions
-
-
Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-
Dialog - Clear AP_Dialog[4]
-
Dialog - Change the title of AP_Dialog[4] to (APs: |cFFFFCC00 + ((String(AP_Counter2)) + |r. Increase Intellect by how much?))
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +1
-
Set AP_DialogAdd[1] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +2
-
Set AP_DialogAdd[2] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +3
-
Set AP_DialogAdd[3] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +4
-
Set AP_DialogAdd[4] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled +5
-
Set AP_DialogAdd[5] = (Last created dialog Button)
-
Dialog - Create a dialog button for AP_Dialog[4] labelled Return
-
Set AP_DialogAdd[6] = (Last created dialog Button)
-
Dialog - Hide AP_Dialog[4] for Player 1 (Red)
-
Dialog - Show AP_Dialog[4] for Player 1 (Red)
-
-
For the record, there's a noticeable lack in tuts for making Dialogs. The one that there is only shows the most basic of dialogs (One menu with 2 simple buttons). And I was quite annoyed when trying to figure out how to get submenus in there!
As I'm sure you'll notice... I write EVERYTHING down so i don't forget what shit is for. I have half a dozen comment triggers in between explaining every aspect of everything so I can pick it up in 6 years if I needed to. If I don't, I'll forget later and I'll be pissed off for not remembering. So, those are simply for my own personal amusement.
Anyway, as per always, I abide by my signature. Also, another shameless advertisement... If I had a Triggerer helping me with my project, these issues wouldn't be happening, and the demo would be released MUCH sooner. More details in the signature. Clicky! <3
Last edited: