- Joined
- Oct 25, 2012
- Messages
- 15
I tried to fix this problem myself for about a week but did not found the solution. I read many forum posts about desync and i can answer ahead that in my case desync is not caused by GetLocalPlayer() function. Yes there is present trigger with using of it, but i tested it many times and it is working properly. I identified a group of triggers that cause desync by disabling them and all of them in "UNDEAD COMMANDERS" directory. Since a week of testing and changing them i almost gave up. i only hope you can help me with it.
Desync happen always in random time and random count of players desyncs. They only have one thing in common they happen when "zombie" interacts with other units.
Desync happen always in random time and random count of players desyncs. They only have one thing in common they happen when "zombie" interacts with other units.
-
UNDEAD REVIVE
-
Events
- Game - The in-game time of day becomes Equal to 17.55
- Conditions
-
Actions
-
For each (Integer NS_HR_INDEX[2]) from 2 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NS_PLAYER_IS_UNDEAD[NS_HR_INDEX[2]] Equal to False
- NS_PLAYER_IS_OBSERVER[NS_HR_INDEX[2]] Equal to False
-
Then - Actions
- Set NS_UNIT_GROUP_INSTANT_TEMP = (Units owned by (Player(NS_HR_INDEX[2])) matching (((Unit-type of (Matching unit)) Equal to Castle) and (((Matching unit) is alive) Equal to True)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in NS_UNIT_GROUP_INSTANT_TEMP) Equal to 0
- ((Load 1 of NS_HR_INDEX[2] in NS_HASH_TABLE_HEROES) is alive) Equal to False
-
Then - Actions
- Custom script: call DestroyGroup(udg_NS_UNIT_GROUP_INSTANT_TEMP)
- Set NS_POINT_INSTANT_TEMP[0] = (Point((Load 81 of NS_HR_INDEX[2] from NS_HASH_TABLE_HEROES), (Load 91 of NS_HR_INDEX[2] from NS_HASH_TABLE_HEROES)))
- Unit - Remove (Load 1 of NS_HR_INDEX[2] in NS_HASH_TABLE_HEROES) from the game
- Unit - Create 1 Undead commander for (Player(NS_HR_INDEX[2])) at NS_POINT_INSTANT_TEMP[0] facing (Load 121 of NS_HR_INDEX[2] from NS_HASH_TABLE_HEROES) degrees
- Hashtable - Save Handle Of(Last created unit) as 1 of NS_HR_INDEX[2] in NS_HASH_TABLE_HEROES
- Custom script: call RemoveLocation(udg_NS_POINT_INSTANT_TEMP[0])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NS_PLAYER_HAS_DARK_GIFT[NS_HR_INDEX[2]] Equal to True
- (Level of FRIENDSHIP (BLACK SHADOW) for (Load 1 of NS_HR_INDEX[2] in NS_HASH_TABLE_HEROES)) Equal to 0
-
Then - Actions
- Unit - Add FRIENDSHIP (BLACK SHADOW) to (Load 1 of NS_HR_INDEX[2] in NS_HASH_TABLE_HEROES)
- Unit - Add EVIL REGENERATION (2 HP) to (Load 1 of NS_HR_INDEX[2] in NS_HASH_TABLE_HEROES)
- Else - Actions
-
If - Conditions
- Unit - Make (Load 1 of NS_HR_INDEX[2] in NS_HASH_TABLE_HEROES) Invulnerable
- Unit - Hide (Load 21 of NS_HR_INDEX[2] in NS_HASH_TABLE_HEROES)
- Hero - Set (Load 1 of NS_HR_INDEX[2] in NS_HASH_TABLE_HEROES) experience to (((Load 31 of NS_HR_INDEX[2] from NS_HASH_TABLE_HEROES) + 1000) x 2), Hide level-up graphics
- Set NS_PLAYER_NIGHT_VISION[NS_HR_INDEX[2]] = True
- Set NS_PLAYER_IS_UNDEAD[NS_HR_INDEX[2]] = True
-
For each (Integer NS_HR_INDEX[3]) from 2 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NS_PLAYER_IS_UNDEAD[NS_HR_INDEX[2]] Equal to True
- NS_PLAYER_IS_UNDEAD[NS_HR_INDEX[3]] Equal to True
- ((Player(NS_HR_INDEX[2])) is an enemy of Player 1 (Red)) Equal to True
- ((Player(NS_HR_INDEX[3])) is an enemy of Player 1 (Red)) Equal to True
-
Then - Actions
- Player - Make (Player(NS_HR_INDEX[2])) treat (Player(NS_HR_INDEX[3])) as an Ally with shared vision
- Player - Make (Player(NS_HR_INDEX[3])) treat (Player(NS_HR_INDEX[2])) as an Ally with shared vision
-
Else - Actions
- Player - Make (Player(NS_HR_INDEX[2])) treat (Player(NS_HR_INDEX[3])) as an Enemy
- Player - Make (Player(NS_HR_INDEX[3])) treat (Player(NS_HR_INDEX[2])) as an Enemy
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Else - Actions
- Custom script: call DestroyGroup(udg_NS_UNIT_GROUP_INSTANT_TEMP)
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer NS_HR_INDEX[1]) from 2 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NS_PLAYER_IS_UNDEAD[NS_HR_INDEX[1]] Equal to True
- (Unit-type of (Load 1 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES)) Equal to Undead commander
- ((Load 1 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES) is alive) Equal to False
- NS_PLAYER_IS_OBSERVER[NS_HR_INDEX[1]] Equal to False
-
Then - Actions
- Set NS_POINT_INSTANT_TEMP[0] = (Point((Load 81 of NS_HR_INDEX[1] from NS_HASH_TABLE_HEROES), (Load 91 of NS_HR_INDEX[1] from NS_HASH_TABLE_HEROES)))
- Hero - Instantly revive (Load 1 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES) at NS_POINT_INSTANT_TEMP[0], Hide revival graphics
- Custom script: call RemoveLocation(udg_NS_POINT_INSTANT_TEMP[0])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NS_PLAYER_HAS_DARK_GIFT[NS_HR_INDEX[1]] Equal to True
- (Level of FRIENDSHIP (BLACK SHADOW) for (Load 1 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES)) Equal to 0
-
Then - Actions
- Unit - Add FRIENDSHIP (BLACK SHADOW) to (Load 1 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES)
- Unit - Add EVIL REGENERATION (2 HP) to (Load 1 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES)
- Else - Actions
-
If - Conditions
- Unit - Make (Load 1 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES) Invulnerable
- Unit - Hide (Load 131 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Countdown Timer - Start NS_TIMER_VULNERABILITY as a One-shot timer that will expire in 7.00 seconds
-
For each (Integer NS_HR_INDEX[2]) from 2 to 12, do (Actions)
-
Events
-
UNDEAD VILNERABILITY
-
Events
- Time - NS_TIMER_VULNERABILITY expires
- Conditions
-
Actions
-
For each (Integer NS_HR_INDEX[1]) from 2 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NS_PLAYER_IS_UNDEAD[NS_HR_INDEX[1]] Equal to True
- (Unit-type of (Load 1 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES)) Equal to Undead commander
-
Then - Actions
- Unit - Make (Load 1 of NS_HR_INDEX[1] in NS_HASH_TABLE_HEROES) Vulnerable
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer NS_HR_INDEX[1]) from 2 to 12, do (Actions)
-
Events
-
UNDEAD DIES
-
Events
- Unit - A unit Dies
-
Conditions
- (Unit-type of (Dying unit)) Equal to Undead commander
- NS_PLAYER_IS_UNDEAD[(Player number of (Owner of (Dying unit)))] Equal to True
-
Actions
- Hashtable - Save (Facing of (Dying unit)) as 121 of (Player number of (Owner of (Dying unit))) in NS_HASH_TABLE_HEROES
- Set NS_POINT_INSTANT_TEMP[0] = (Position of (Dying unit))
- Hashtable - Save (X of NS_POINT_INSTANT_TEMP[0]) as 81 of (Player number of (Owner of (Dying unit))) in NS_HASH_TABLE_HEROES
- Hashtable - Save (Y of NS_POINT_INSTANT_TEMP[0]) as 91 of (Player number of (Owner of (Dying unit))) in NS_HASH_TABLE_HEROES
- Unit - Move (Load 131 of (Player number of (Owner of (Dying unit))) in NS_HASH_TABLE_HEROES) instantly to NS_POINT_INSTANT_TEMP[0], facing (Facing of (Dying unit)) degrees
- Animation - Play (Load 131 of (Player number of (Owner of (Dying unit))) in NS_HASH_TABLE_HEROES)'s death animation
- Unit - Unhide (Load 131 of (Player number of (Owner of (Dying unit))) in NS_HASH_TABLE_HEROES)
- Custom script: call RemoveLocation(udg_NS_POINT_INSTANT_TEMP[0])
-
Events
-
ADAPT ATTACK 4
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Unit-type of (Attacking unit)) Equal to Undead commander
-
Actions
- Hashtable - Save (0.08 + (Load 41 of (Player number of (Owner of (Attacking unit))) from NS_HASH_TABLE_HEROES)) as 41 of (Player number of (Owner of (Attacking unit))) in NS_HASH_TABLE_HEROES
-
Events
-
ADAPT ARMOR 5
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Unit-type of (Attacked unit)) Equal to Undead commander
-
Actions
- Hashtable - Save (0.05 + (Load 51 of (Player number of (Owner of (Attacked unit))) from NS_HASH_TABLE_HEROES)) as 51 of (Player number of (Owner of (Attacked unit))) in NS_HASH_TABLE_HEROES
-
Events
-
ADAPT RESISTANCE 6
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Unit-type of (Target unit of ability being cast)) Equal to Undead commander
-
Actions
- Hashtable - Save (1.00 + (Load 61 of (Player number of (Owner of (Target unit of ability being cast))) from NS_HASH_TABLE_HEROES)) as 61 of (Player number of (Owner of (Target unit of ability being cast))) in NS_HASH_TABLE_HEROES
-
Events
-
ADAPT SPEED 7
-
Events
- Time - Every 0.61 seconds of game time
- Conditions
-
Actions
-
For each (Integer NS_HR_INDEX[0]) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Load 1 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES)) Equal to Undead commander
- ((Load 1 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES) is alive) Equal to True
-
Then - Actions
- Hashtable - Save (Load 81 of NS_HR_INDEX[0] from NS_HASH_TABLE_HEROES) as 101 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES
- Hashtable - Save (Load 91 of NS_HR_INDEX[0] from NS_HASH_TABLE_HEROES) as 111 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES
- Set NS_POINT_INSTANT_TEMP[0] = (Position of (Load 1 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Terrain pathing at NS_POINT_INSTANT_TEMP[0] of type Walkability is off) Equal to True
- ((Load 71 of NS_HR_INDEX[0] from NS_HASH_TABLE_HEROES) / 2300.00) Greater than or equal to 70.00
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Jump (|cffffcc00J|r) (ZOMBIE) for (Load 1 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES)) Equal to 0
-
Then - Actions
- Unit - Add Jump (|cffffcc00J|r) (ZOMBIE) to (Load 1 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES)
-
Else - Actions
- Unit - Set level of Jump (|cffffcc00J|r) (ZOMBIE) for (Load 1 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES) to (Min((Max((Integer(((((Load 71 of NS_HR_INDEX[0] from NS_HASH_TABLE_HEROES) / 2300.00) - 70.00) x 0.20))), 1)), 20))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Hashtable - Save (X of NS_POINT_INSTANT_TEMP[0]) as 81 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES
- Hashtable - Save (Y of NS_POINT_INSTANT_TEMP[0]) as 91 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES
- Custom script: call RemoveLocation(udg_NS_POINT_INSTANT_TEMP[0])
- Hashtable - Save ((Square root(((Power(((Load 81 of NS_HR_INDEX[0] from NS_HASH_TABLE_HEROES) - (Load 101 of NS_HR_INDEX[0] from NS_HASH_TABLE_HEROES)), 2.00)) + (Power(((Load 91 of NS_HR_INDEX[0] from NS_HASH_TABLE_HEROES) - (Load 111 of NS_HR_INDEX[0] from NS_HASH_TABLE_HER as 71 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Load 71 of NS_HR_INDEX[0] from NS_HASH_TABLE_HEROES) / 2300.00) Greater than or equal to 1.00
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Speed (ZOMBIE) for (Load 1 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES)) Equal to 0
-
Then - Actions
- Unit - Add Speed (ZOMBIE) to (Load 1 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES)
-
Else - Actions
- Unit - Set level of Speed (ZOMBIE) for (Load 1 of NS_HR_INDEX[0] in NS_HASH_TABLE_HEROES) to (Min((Max((Integer(((Load 71 of NS_HR_INDEX[0] from NS_HASH_TABLE_HEROES) / 2300.00))), 1)), 100))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer NS_HR_INDEX[0]) from 1 to 12, do (Actions)
-
Events
-
ADAPT ATTACK N ARMOR 456
-
Events
- Time - Every 3.29 seconds of game time
- Conditions
-
Actions
-
For each (Integer NS_HR_INDEX[7]) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)) Equal to Undead commander
- ((Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES) is alive) Equal to True
-
Then - Actions
- Player - Set the current research level of Adapt attack strength to (Min((Max((Integer((Load 41 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES))), 0)), 100)) for (Player(NS_HR_INDEX[7]))
- Player - Set the current research level of Adapt armor defence to (Min((Max((Integer((Load 51 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES))), 0)), 100)) for (Player(NS_HR_INDEX[7]))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load 41 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES) Greater than or equal to 50.00
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Claws (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)) Equal to 0
-
Then - Actions
- Unit - Add Claws (ZOMBIE) to (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)
- Unit - Add Insane power (|cffffcc00I|r) (ZOMBIE) to (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)
-
Else - Actions
- Unit - Set level of Insane power (|cffffcc00I|r) (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES) to (Min((Max((Integer((((Load 41 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES) - 50.00) x 0.20))), 1)), 25))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load 51 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES) Greater than or equal to 50.00
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Spiked armor (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)) Equal to 0
-
Then - Actions
- Unit - Add Spiked armor (ZOMBIE) to (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)
-
Else - Actions
- Unit - Set level of Spiked armor (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES) to (Min((Max((Integer((((Load 51 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES) - 50.00) x 0.50))), 1)), 35))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load 61 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES) Greater than or equal to 1.00
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Magic protection (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)) Equal to 0
-
Then - Actions
- Unit - Add Regeneration (ZOMBIE) to (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)
- Unit - Add Magic protection (ZOMBIE) to (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)
- Unit - Add Health (ZOMBIE) to (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)
- Unit - Add Magic protection (DESCRIPTION) to (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)
-
Else - Actions
- Unit - Set level of Regeneration (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES) to (Min((Max((Integer((Load 61 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES))), 1)), 45))
- Unit - Set level of Magic protection (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES) to (Min((Max((Integer((Load 61 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES))), 1)), 45))
- Unit - Set level of Health (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES) to (Min((Max((Integer((Load 61 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES))), 1)), 45))
- Unit - Set level of Magic protection (DESCRIPTION) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES) to (Min((Max((Integer((Load 61 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES))), 1)), 45))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load 61 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES) Greater than or equal to 30.00
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Block magic (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)) Equal to 0
-
Then - Actions
- Unit - Add Block magic (ZOMBIE) to (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES)
-
Else - Actions
- Unit - Set level of Block magic (ZOMBIE) for (Load 1 of NS_HR_INDEX[7] in NS_HASH_TABLE_HEROES) to (Min((Max((Integer((((Load 61 of NS_HR_INDEX[7] from NS_HASH_TABLE_HEROES) - 20.00) x 0.20))), 1)), 5))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer NS_HR_INDEX[7]) from 1 to 12, do (Actions)
-
Events
Attachments
Last edited: