I have a cooldown window based revive - buy back trigger and it works fine in singleplayer. However, I hooked up a friend and we played together. The moment I died and typed -bb , I get instantly disconnected. I'm not sure if it is a server-splitting leak or whatsoever. Here are the triggers:
This just sets some boolean variables to true at the start of the map. True = Alive, False = Dead
When Blue's hero becomes revivable, this trigger fires off.
It also turns on these two triggers.
This trigger revives the hero at a region after the cooldown timer expires. It fires off with no issue.
and this trigger here is what disconnected me instantly. What this trigger does (or attempting to do) is when blue types -bb, I will destroy the cooldown windows instantly and revive the hero at the region. It works fine in Single Player, but online, disconnects me instantly.
Any help will be great. Thanks!
This just sets some boolean variables to true at the start of the map. True = Alive, False = Dead
Code:
Init Values for Player unit Status
Events
Map initialization
Conditions
Actions
Set IsAliveBoolean_P1 = True
Set IsAliveBoolean_P2 = True
Set IsAliveBoolean_P3 = True
Set IsAliveBoolean_P4 = True
When Blue's hero becomes revivable, this trigger fires off.
Code:
R Blue Becomes Revivable
Events
Unit - A unit Becomes revivable
Conditions
(Owner of (Revivable Hero)) Equal to Player 2 (Blue)
Actions
Set IsAliveBoolean_P2 = False
Set RevivableUnit[1] = (Revivable Hero)
Countdown Timer - Create a timer window for Timer[3] with title ((Name of (Owner of RevivableUnit[1])) + (Revive in.. + (String(((Level of RevivableUnit[1]) x 3)))))
Set cd_timer_window[3] = (Last created timer window)
Countdown Timer - Show cd_timer_window[3] for Player 2 (Blue)
Set Real_Number[1] = (3.00 x (Real((Level of RevivableUnit[1]))))
Countdown Timer - Start Timer[3] as a One-shot timer that will expire in Real_Number[1] seconds
Trigger - Turn on Revive Blue <gen>
Trigger - Turn on R Blue Buy Back <gen>
This trigger revives the hero at a region after the cooldown timer expires. It fires off with no issue.
Code:
Revive Blue
Events
Time - Timer[3] expires
Conditions
IsAliveBoolean_P2 Equal to False
Actions
Set IsAliveBoolean_P2 = True
Countdown Timer - Hide cd_timer_window[3]
Countdown Timer - Destroy cd_timer_window[3]
Hero - Instantly revive RevivableUnit[1] at (Center of REVIVE <gen>), Show revival graphics
Selection - Select RevivableUnit[1] for (Owner of RevivableUnit[1])
Camera - Pan camera as necessary for (Owner of RevivableUnit[1]) to (Center of REVIVE <gen>) over 0.50 seconds
Set RevivableUnit[1] = No unit
Trigger - Turn off R Blue Buy Back <gen>
Trigger - Turn off (This trigger)
and this trigger here is what disconnected me instantly. What this trigger does (or attempting to do) is when blue types -bb, I will destroy the cooldown windows instantly and revive the hero at the region. It works fine in Single Player, but online, disconnects me instantly.
Code:
R Blue Buy Back
Events
Player - Player 2 (Blue) types a chat message containing -bb as An exact match
Conditions
Actions
-------- ------------- --------
Set IsAliveBoolean_P2 = True
Game - Display to Player Group - Player 2 (Blue) the text: (|c00FF7F00That Buy back costed you: |r + ((String((200 x (Level of RevivableUnit[1])))) + |c00FF7F00 Gold. Ouch!: |r))
Countdown Timer - Hide cd_timer_window[3]
Countdown Timer - Destroy cd_timer_window[3]
Hero - Instantly revive RevivableUnit[1] at (Center of REVIVE <gen>), Show revival graphics
Selection - Select RevivableUnit[1] for (Owner of RevivableUnit[1])
Camera - Pan camera as necessary for (Owner of RevivableUnit[1]) to (Center of REVIVE <gen>) over 0.50 seconds
Player - Add (-200 x (Level of RevivableUnit[1])) to (Owner of RevivableUnit[1]) Current gold
Set RevivableUnit[1] = No unit
Trigger - Turn off Revive Blue <gen>
Trigger - Turn off (This trigger)
Any help will be great. Thanks!