Whenever my hero acquires an item the count starts from -1. So say the Hero acquires a Stolen Sack. The first time the item is acquired the item count increments from -1 to 0.
Whenever my hero drops an item the count actually increases by 1. Say I have 4 Stolen Sacks. If I drop one the count goes up to 5.
I cant explain this behaviour at all. I feel like I'm making a simple mistake somewhere.
Whenever my hero drops an item the count actually increases by 1. Say I have 4 Stolen Sacks. If I drop one the count goes up to 5.
I cant explain this behaviour at all. I feel like I'm making a simple mistake somewhere.
-
Events
-

Unit - A unit Acquires an item
-
-
Conditions
-

(Item-type of (Item being manipulated)) Equal to Stolen Sack
-

((Hero manipulating item) is A Hero) Equal to True
-
-
Actions
-

Set VariableSet QuestingPlayerNumber = (Player number of (Owner of (Hero manipulating item)))
-

Set VariableSet StolenSacksItemCount[QuestingPlayerNumber] = (StolenSacksItemCount[QuestingPlayerNumber] + 1)
-

Game - Display to (Player group(mPlayer[QuestingPlayerNumber])) the text: ((String(StolenSacksItemCount[QuestingPlayerNumber])) + /4 Sacks Collected)
-

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


If - Conditions
-



StolenSacksItemCount[QuestingPlayerNumber] Greater than or equal to 4
-
-


Then - Actions
-



Set VariableSet StolenSacksQuestStep[QuestingPlayerNumber] = 2
-
-


Else - Actions
-
-
-
Events
-

Unit - A unit Loses an item
-
-
Conditions
-

(Item-type of (Item being manipulated)) Equal to Stolen Sack
-

((Hero manipulating item) is A Hero) Equal to True
-
-
Actions
-

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


If - Conditions
-



StolenSacksQuestStep[PlayerNumber] Equal to 2
-
-


Then - Actions
-



Set VariableSet QuestingPlayerNumber = (Player number of (Owner of (Hero manipulating item)))
-



Set VariableSet StolenSacksItemCount[QuestingPlayerNumber] = (StolenSacksItemCount[QuestingPlayerNumber] - 1)
-



Game - Display to (Player group(mPlayer[QuestingPlayerNumber])) the text: ((String(StolenSacksItemCount[QuestingPlayerNumber])) + /4 Sacks Collected)
-
-


Else - Actions
-
-
Last edited:


