xoxdragonxox
New Member
- Reaction score
- 1
Can the 2 triggers be improved.
and can anyone kindly convert this into jass I've got the event else where btw
JASS:
function Trig_On_and_Off_Conditions takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem()) == 039;I00C039;
endfunction
function Trig_On_and_Off_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local integer i = GetConvertedPlayerId(p)
call RemoveItem( GetManipulatedItem() )
call ForceAddPlayerSimple( p, udg_LGroup )
call CreateNUnitsAtLoc( 1, 039;h00U039;, p, GetRandomLocInRect(gg_rct_Air), bj_UNIT_FACING )
set udg_LLight<i> = GetLastCreatedUnit()
call SetUnitPathing( udg_LLight<i>, false )
set u = null
endfunction
//===========================================================================
function InitTrig_On_and_Off takes nothing returns nothing
set gg_trg_On_and_Off = CreateTrigger( )
call DisableTrigger( gg_trg_On_and_Off )
call TriggerRegisterAnyUnitEventBJ( gg_trg_On_and_Off, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_On_and_Off, Condition( function Trig_On_and_Off_Conditions ) )
call TriggerAddAction( gg_trg_On_and_Off, function Trig_On_and_Off_Actions )
endfunction</i></i>
JASS:
function MoveLight takes nothing returns nothing
local player p = GetEnumPlayer()
local integer i = GetConvertedPlayerId(p)
set udg_LPoint1<i> = GetUnitLoc(udg_Hero<i>)
set udg_LPoint2<i> = PolarProjectionBJ(udg_LPoint1<i>, 500.00, GetUnitFacing(udg_Hero<i>))
call SetUnitPositionLoc( udg_LLight<i>, udg_LPoint2<i> )
call RemoveLocation (udg_LPoint1<i>)
call RemoveLocation (udg_LPoint2<i>)
endfunction
function Trig_Move_Actions takes nothing returns nothing
call ForForce( udg_LGroup, function MoveLight )
endfunction
//===========================================================================
function InitTrig_Move takes nothing returns nothing
set gg_trg_Move = CreateTrigger( )
call DisableTrigger( gg_trg_Move )
call TriggerRegisterTimerEventPeriodic( gg_trg_Move, 0.04 )
call TriggerAddAction( gg_trg_Move, function Trig_Move_Actions )
endfunction</i></i></i></i></i></i></i></i></i>
and can anyone kindly convert this into jass I've got the event else where btw
Trigger:
- Boom
- Events
- Conditions
- (Unit-type of (Entering unit)) Equal to Marked Area
- Actions
- Unit - Cause (Triggering unit) to damage circular area after 0.01 seconds of radius 250.00 at (Position of (Entering unit)), dealing 250.00 damage of attack type Spells and damage type Normal
- Unit - Kill (Entering unit)