- Joined
- Jan 24, 2009
- Messages
- 606
The Problem for me is that when it's Supose to let all Players use the Command it's only the first player who Write's it that will be transported Out of it... The script is in vJASS and it's Below(i think it's something with the Loop to do but not sure)
JASS:
scope FinishLoot initializer init
private function c takes nothing returns boolean
local unit u=SystemTrace_dc(GetTriggerPlayer())
if u!=null then
call ItemLoot_clearitem(GetTriggerPlayer())
call SetUnitPosition(u,-1104,1087)
if GetTriggerPlayer()==GetLocalPlayer() then
call PanCameraToTimed(-1104,1087,0)
endif
call SystemTrace_dr(u)
endif
set u=null
return false
endfunction
private function init takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=0
loop
exitwhen i>10
call TriggerRegisterPlayerChatEvent(t,Player(i),"-done",true)
set i=i+1
endloop
call TriggerAddCondition(t,Condition(function c))
endfunction
endscope