- Joined
- Jan 1, 2012
- Messages
- 50
hi, i've the biggest problem of the world !!
this is my triggers :
if i put all the code within function/endfunction in comments, i have a big spike.
else, i crash.
who has an idea ?
this is my triggers :
JASS:
function CreateMobCondition takes nothing returns boolean
return IsPlayerInForce(GetTriggerPlayer(), udg_Creater)
endfunction
function Trig_create_mob_Actions takes nothing returns nothing
local integer i = GetPlayerId(GetTriggerPlayer())
call IssueImmediateOrder(udg_hero_j[i], "stop")
if udg_Wait_action[i] == false then
set udg_Wait_action[i] = true
set udg_Futur_rect_a_x[udg_J] = GetOrderPointX()
set udg_Futur_rect_a_y[udg_J] = GetOrderPointY()
call BJDebugMsg(R2S(udg_Futur_rect_a_x[udg_J]))
call BJDebugMsg(R2S(udg_Futur_rect_a_y[udg_J]))
set udg_Unit_in_creation[i] = CreateUnit(Player(11), udg_Mob, udg_Futur_rect_a_x[udg_J], udg_Futur_rect_a_y[udg_J], 0)
set udg_Unit_created[udg_L] = udg_Unit_in_creation[i]
set udg_L = udg_L + 1
elseif udg_Wait_action[i] == true then
set udg_Wait_action[i] = false
set udg_Futur_rect_b_x[udg_J] = GetOrderPointY()
set udg_Futur_rect_b_y[udg_J] = GetOrderPointY()
call IssuePointOrder(udg_Unit_in_creation[i], "patrol", udg_Futur_rect_b_x[udg_J], udg_Futur_rect_b_y[udg_J])
set udg_J = udg_J + 1
set udg_Unit_in_creation[i] = null
endif
endfunction
//===========================================================================
function InitTrig_create_mob takes nothing returns nothing
set gg_trg_create_mob = CreateTrigger( )
call TriggerAddCondition(gg_trg_create_mob, Condition(function CreateMobCondition))
call TriggerAddAction( gg_trg_create_mob, function Trig_create_mob_Actions )
endfunction
JASS:
function CreateMobCondition2 takes nothing returns boolean
return IsPlayerInForce(GetTriggerPlayer(), udg_Creater2)
endfunction
function Trig_create_roc_Actions takes nothing returns nothing
local integer i = GetPlayerId(GetTriggerPlayer())
call IssueImmediateOrder(udg_hero_j[i], "stop")
set udg_Futur_rect_roc_x[udg_K] = GetOrderPointX()
set udg_Futur_rect_roc_y[udg_K] = GetOrderPointY()
set udg_Unit_created[udg_L] = CreateUnit(Player(11), udg_pierre, udg_Futur_rect_roc_x[udg_K], udg_Futur_rect_roc_y[udg_K], 0)
set udg_K = udg_K + 1
set udg_L = udg_L + 1
endfunction
//===========================================================================
function InitTrig_create_roc takes nothing returns nothing
set gg_trg_create_roc = CreateTrigger( )
call TriggerAddCondition(gg_trg_create_roc, Condition(function CreateMobCondition2))
call TriggerAddAction( gg_trg_create_roc, function Trig_create_roc_Actions )
endfunction
if i put all the code within function/endfunction in comments, i have a big spike.
else, i crash.
who has an idea ?