Ok now after nearly 2 years, i have got my Save/Load System working, i am thinking of continuing with my map.
However issue i got is multiboard doesnt update
EDIT: I Changed This To Code Below, and it now updates.
Now Another Question, Mineral Shop Issue,
If i have only 1 item in shop costing 1 specific price, it somewhat works, however if u spam click the train unit, it builds without charging
i tried to add a second item to shope, and from what i thought i had to have all minerals in TheSale tab, so there in there, i added display to show what it cost in one note hoping that worked, but says requires ## of each resource does text, but if i put in seperate 2 different if all conditions, it shows both the text still not just the one from the one text.
And if i set it like this it pips up need coal and iron 100 times and crashes game
However issue i got is multiboard doesnt update
EDIT: I Changed This To Code Below, and it now updates.
-
MineralUpdate
-
Events
-
Time - Every 5.00 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 1 to (Coal: + (String(CoalMineral[(Integer A)])))
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 2 to (|cff808080Iron|r: + (String(IronMineral[(Integer A)])))
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 3 to (|cffffff00Gold|r: + (String(GoldMineral[(Integer A)])))
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 4 to (|cff0000ffSapphire|r: + (String(SapphireMineral[(Integer A)])))
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 5 to (|cffff0000Ruby|r: + (String(RubyMineral[(Integer A)])))
-
-
-
-
-
MineralUpdate
-
Events
-
Time - Every 5.00 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 1 to (Coal: + (String(CoalMineral[(Integer A)])))
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 2 to (|cff808080Iron|r: + (String(IronMineral[(Integer A)])))
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 3 to (|cffffff00Gold|r: + (String(GoldMineral[(Integer A)])))
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 4 to (|cff0000ffSapphire|r: + (String(SapphireMineral[(Integer A)])))
-
Multiboard - Set the text for MineralBoard[(Integer A)] item in column 1, row 5 to (|cffff0000Ruby|r: + (String(RubyMineral[(Integer A)])))
-
Set VariableSet ShowPlayer = (Player((Integer A)))
-
Custom script: if GetLocalPlayer() == udg_ShowPlayer then
-
Multiboard - Hide MineralBoard[(Integer A)]
-
Custom script: endif
-
Set VariableSet ShowPlayer = (Player((Integer A)))
-
Custom script: if GetLocalPlayer() == udg_ShowPlayer then
-
Multiboard - Show MineralBoard[(Integer A)]
-
Custom script: endif
-
-
-
-
Now Another Question, Mineral Shop Issue,
-
Cancel
-
Events
-
Time - CancelTimer expires
-
-
Conditions
-
Actions
-
Custom script: call IssueImmediateOrderById(udg_CancelUnit, 851976)
-
-
-
SetupShop
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Hashtable - Create a hashtable
-
Set VariableSet MineralHash = (Last created hashtable)
-
-------- Cost Coal --------
-
Set VariableSet UType = Counterfeiter
-
Custom script: set udg_UType_Int = udg_UType
-
Hashtable - Save 50 as (Key Coal.) of UType_Int in MineralHash.
-
Set VariableSet UType = Peasant
-
Custom script: set udg_UType_Int = udg_UType
-
Hashtable - Save 25 as (Key Coal.) of UType_Int in MineralHash.
-
-------- Cost Iron --------
-
Set VariableSet UType = Counterfeiter Iron
-
Custom script: set udg_UType_Int = udg_UType
-
Hashtable - Save 300 as (Key Iron.) of UType_Int in MineralHash.
-
-
-
TheSale
-
Events
-
Unit - A unit Is issued an order with no target
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Hut
-
-
-
-
Actions
-
Custom script: set udg_UType_Int = GetIssuedOrderId()
-
Set VariableSet CoalCost = (Load (Key Coal.) of UType_Int from MineralHash.)
-
Set VariableSet IronCost = (Load (Key Iron.) of UType_Int from MineralHash.)
-
Set VariableSet GoldCost = (Load (Key Gold.) of UType_Int from MineralHash.)
-
Set VariableSet SapphireCost = (Load (Key Sapphire.) of UType_Int from MineralHash.)
-
Set VariableSet RubyCost = (Load (Key Ruby.) of UType_Int from MineralHash.)
-
Set VariableSet PlayerNum = (Player number of (Triggering player))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CoalMineral[PlayerNum] Greater than or equal to CoalCost
-
IronMineral[PlayerNum] Greater than or equal to IronCost
-
GoldMineral[PlayerNum] Greater than or equal to GoldCost
-
SapphireMineral[PlayerNum] Greater than or equal to SapphireCost
-
RubyMineral[PlayerNum] Greater than or equal to SapphireCost
-
-
Then - Actions
-
Set VariableSet CoalMineral[PlayerNum] = (CoalMineral[PlayerNum] - CoalCost)
-
Set VariableSet IronMineral[PlayerNum] = (IronMineral[PlayerNum] - IronCost)
-
Set VariableSet GoldMineral[PlayerNum] = (GoldMineral[PlayerNum] - GoldCost)
-
Set VariableSet SapphireMineral[PlayerNum] = (SapphireMineral[PlayerNum] - SapphireCost)
-
Set VariableSet RubyMineral[PlayerNum] = (RubyMineral[PlayerNum] - RubyCost)
-
-
Else - Actions
-
Set VariableSet CancelUnit = (Triggering unit)
-
Countdown Timer - Start CancelTimer as a One-shot timer that will expire in 0.00 seconds
-
Game - Display to (All players) the text: (Requires " + ((String(CoalCost)) + " Coal!))
-
Game - Display to (All players) the text: (Requires " + ((String(IronCost)) + " Iron!))
-
Game - Display to (All players) the text: (Requires " + ((String(GoldCost)) + " Gold!))
-
Game - Display to (All players) the text: (Requires " + ((String(SapphireCost)) + " Sapphire!))
-
Game - Display to (All players) the text: (Requires " + ((String(RubyCost)) + " Ruby!))
-
-
-
-
If i have only 1 item in shop costing 1 specific price, it somewhat works, however if u spam click the train unit, it builds without charging
i tried to add a second item to shope, and from what i thought i had to have all minerals in TheSale tab, so there in there, i added display to show what it cost in one note hoping that worked, but says requires ## of each resource does text, but if i put in seperate 2 different if all conditions, it shows both the text still not just the one from the one text.
And if i set it like this it pips up need coal and iron 100 times and crashes game
-
TheSale
-
Events
-
Unit - A unit Is issued an order with no target
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Hut
-
-
-
-
Actions
-
Custom script: set udg_UType_Int = GetIssuedOrderId()
-
Set VariableSet CoalCost = (Load (Key Coal.) of UType_Int from MineralHash.)
-
Set VariableSet IronCost = (Load (Key Iron.) of UType_Int from MineralHash.)
-
Set VariableSet GoldCost = (Load (Key Gold.) of UType_Int from MineralHash.)
-
Set VariableSet SapphireCost = (Load (Key Sapphire.) of UType_Int from MineralHash.)
-
Set VariableSet RubyCost = (Load (Key Ruby.) of UType_Int from MineralHash.)
-
Set VariableSet PlayerNum = (Player number of (Triggering player))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Counterfeiter
-
CoalMineral[PlayerNum] Greater than or equal to CoalCost
-
-
Then - Actions
-
Set VariableSet CoalMineral[PlayerNum] = (CoalMineral[PlayerNum] - CoalCost)
-
-
Else - Actions
-
Set VariableSet CancelUnit = (Triggering unit)
-
Countdown Timer - Start CancelTimer as a One-shot timer that will expire in 0.00 seconds
-
Game - Display to (All players) the text: (Requires " + ((String(CoalCost)) + " Coal!))
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Counterfeiter Iron
-
IronMineral[PlayerNum] Greater than or equal to IronCost
-
-
Then - Actions
-
Set VariableSet IronMineral[PlayerNum] = (IronMineral[PlayerNum] - IronCost)
-
-
Else - Actions
-
Set VariableSet CancelUnit = (Triggering unit)
-
Countdown Timer - Start CancelTimer as a One-shot timer that will expire in 0.00 seconds
-
Game - Display to (All players) the text: (Requires " + ((String(IronCost)) + " Iron!))
-
-
-
-
Last edited: