Добавлен DarkLigthing,
опубликован
Всего пара строк кода, но получается чёткая фигура. Попытайтесь догадаться как это работает? =)
триггер1
function stop_drawing takes nothing returns nothing
call DisableTrigger(gg_trg_go)
endfunction
function Trig_initialization_Actions takes nothing returns nothing
local timer t = CreateTimer()
set udg_loc = Location((GetUnitX( gg_unit_h000_0001)+GetUnitX( gg_unit_h000_0002))/2,(GetUnitY( gg_unit_h000_0001)+GetUnitY( gg_unit_h000_0002))/2)
call FogEnable(false)
call FogMaskEnable(false)
call TimerStart(t,40.0,false, function stop_drawing )
endfunction
//===========================================================================
function InitTrig_initialization takes nothing returns nothing
set gg_trg_initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_initialization, function Trig_initialization_Actions )
endfunction
триггер2
function Trig_go_Actions takes nothing returns nothing
local integer r = GetRandomInt(1,3)
call CreateUnitAtLoc(Player(0),'h000',udg_loc,0.00)
if r == 1 then
call MoveLocation(udg_loc,(GetLocationX(udg_loc)+GetUnitX( gg_unit_h000_0001))/2,(GetLocationY(udg_loc)+GetUnitY( gg_unit_h000_0001))/2)
elseif r == 2
call MoveLocation(udg_loc,(GetLocationX(udg_loc)+GetUnitX( gg_unit_h000_0002))/2,(GetLocationY(udg_loc)+GetUnitY( gg_unit_h000_0002))/2)
elseif r == 3
call MoveLocation(udg_loc,(GetLocationX(udg_loc)+GetUnitX( gg_unit_h000_0003))/2,(GetLocationY(udg_loc)+GetUnitY( gg_unit_h000_0003))/2)
endif
endfunction
//===========================================================================
function InitTrig_go takes nothing returns nothing
set gg_trg_go = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_go, 0.01 )
call TriggerAddAction( gg_trg_go, function Trig_go_Actions )
endfunction
весь код
`
ОЖИДАНИЕ РЕКЛАМЫ...
Чтобы оставить комментарий, пожалуйста, войдите на сайт.
Отредактирован Diaboliko
Возможно из-за того что эффекты были эффектные, хз.
Отредактирован Raised
Отредактирован Clamp