- Joined
- Nov 3, 2013
- Messages
- 989
My intention is to have a shop with categories to browse through, for this to work I thought of changing the shops content locally so that each player can browse from the same shop without interfering with each other.
As it is it desync after the 2nd purchase, I assume it's because a unit is purchased that isn't even available on the other clients. (I had hoped that it would not desync since the units bought are dummies that don't do anything and gets removed instantly)
The trigger I pulled together for the testing:
As it is it desync after the 2nd purchase, I assume it's because a unit is purchased that isn't even available on the other clients. (I had hoped that it would not desync since the units bought are dummies that don't do anything and gets removed instantly)
The trigger I pulled together for the testing:
-
Untitled Trigger 003
-
Events
- Unit - A unit Sells a unit
-
Conditions
- (Triggering unit) Equal to Mercenary Camp (Black Citadel) 0011 <gen>
-
Actions
- Set tempUnit = (Sold unit)
- Set tempUtype = (Unit-type of tempUnit)
- Unit - Remove tempUnit from the game
- Set tempUnit = (Triggering unit)
- Set tempPlayer = (Owner of (Buying unit))
- -------- local player only --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- tempPlayer Equal to GetLocalPlayer
-
Then - Actions
- -------- if unit type == return to categories tab then --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- tempUtype Equal to Return to the all catagories tab (dummy unit)
-
Then - Actions
- -------- Clear --------
- Neutral Building - Remove Return to the all catagories tab (dummy unit) from tempUnit
- Neutral Building - Remove Berserk (dummy unit) from tempUnit
- Neutral Building - Remove Channel (dummy unit) from tempUnit
- Neutral Building - Remove Feedback (dummy unit) from tempUnit
- -------- Add Categories --------
- Neutral Building - Add No target abilities tab (dummy unit) to tempUnit with 0 in stock and a max stock of 1
- Neutral Building - Add PBAoE abilities tab (dummy unit) to tempUnit with 0 in stock and a max stock of 1
- Neutral Building - Add Passive abilities tab (dummy unit) to tempUnit with 0 in stock and a max stock of 1
- Neutral Building - Add Single target abilities tab (dummy unit) to tempUnit with 0 in stock and a max stock of 1
- Neutral Building - Add Summon abilities tab (dummy unit) to tempUnit with 0 in stock and a max stock of 1
- Neutral Building - Add Target point AoE abilities tab (dummy unit) to tempUnit with 0 in stock and a max stock of 1
- Neutral Building - Add Target point cone & projectile abilities tab (dummy unit) to tempUnit with 0 in stock and a max stock of 1
-
Else - Actions
- -------- if unit type == no target active then --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- tempUtype Equal to No target abilities tab (dummy unit)
-
Then - Actions
- -------- Clear --------
- Neutral Building - Remove No target abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Summon abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Passive abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Target point AoE abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Target point cone & projectile abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove PBAoE abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Single target abilities tab (dummy unit) from tempUnit
- -------- Add the no target activate abilities --------
- Neutral Building - Add Berserk (dummy unit) to tempUnit with 0 in stock and a max stock of 1
- -------- Return & Next page --------
- Neutral Building - Add Return to the all catagories tab (dummy unit) to tempUnit with 0 in stock and a max stock of 1
-
Else - Actions
- -------- if unit type == passive then --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- tempUtype Equal to Passive abilities tab (dummy unit)
-
Then - Actions
- -------- Clear --------
- Neutral Building - Remove No target abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Summon abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Passive abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Target point AoE abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Target point cone & projectile abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove PBAoE abilities tab (dummy unit) from tempUnit
- Neutral Building - Remove Single target abilities tab (dummy unit) from tempUnit
- -------- Add Passives --------
- Neutral Building - Add Feedback (dummy unit) to tempUnit with 0 in stock and a max stock of 1
- -------- Return & Next page --------
- Neutral Building - Add Return to the all catagories tab (dummy unit) to tempUnit with 0 in stock and a max stock of 1
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Events