- Joined
- Mar 3, 2006
- Messages
- 1,564
From a thread by shadowvzs
I have tested it using kLoader and the second player got disconnected.
My script is this:
11. Trackables, for 1-2 player only?
Question - this cause desyncronization?
Answer - No - tested myself
I have tested it using kLoader and the second player got disconnected.
My script is this:
JASS:
//======================== TEXT MACROS BLOCK ========================
//! textmacro action_block takes TYPE , CALLCODE
if chatString == "$TYPE$" then
call $CALLCODE$
endif
//! endtextmacro
//! textmacro event_block takes TYPE
call TriggerRegisterPlayerChatEvent(test,Player(0),"$TYPE$",true)
//! endtextmacro
//=======================================================================
globals
player testingPlayer = Player(0)
string trackablePath = "units\\nightelf\\Wisp\\Wisp.mdl"
endglobals
function test_Actions takes nothing returns nothing
local string chatString = GetEventPlayerChatString()
if ( GetLocalPlayer() == testingPlayer ) then
//! runtextmacro action_block("unit","CreateUnit(Player(15),'hpea',0,0,0)")
//! runtextmacro action_block("item","CreateItem('gomn',0,0)")
//! runtextmacro action_block("trackable","CreateTrackable(trackablePath,0,0,0)")
//! runtextmacro action_block("itemVis","SetItemVisible(gg_item_lmbr_0002,false)")
endif
endfunction
function desyncTest takes nothing returns nothing
local trigger test = CreateTrigger()
//! runtextmacro event_block("unit")
//! runtextmacro event_block("item")
//! runtextmacro event_block("trackable")
//! runtextmacro event_block("itemVis")
call TriggerAddAction( test , function test_Actions )
endfunction