Andrewgosu
The Silent Pandaren Helper
- Reaction score
- 716
Basically, a thread, which will get flooded with my questions about JASS.
How exactly do I have to use function TriggerAddAction, if I want to add new actions to a local trigger?
If I want to add all these actions to a trigger, do I have to add them one by one?
How exactly do I have to use function TriggerAddAction, if I want to add new actions to a local trigger?
Code:
local integer i = GetIssuedOrderId()
local real x = ( GetOrderPointX() + GetRandomReal( 30, 60 ) )
local real y = ( GetOrderPointY() + GetRandomReal( 30, 60 ) )
if ( GetUnitState( ..., UNIT_STATE_LIFE ) == 0 ) then
call DestroyTrigger( point )
else
call PolledWait( 1 )
call IssuePointOrderById( ..., i, x, y )
endif
If I want to add all these actions to a trigger, do I have to add them one by one?
Code:
function Trig_summon_Actions takes nothing returns nothing
local trigger point = CreateTrigger()
call TriggerRegisterUnitEvent( point, b, EVENT_UNIT_ISSUED_POINT_ORDER )
call TriggerAddAction( point, local integer i = GetIssuedOrderId() )
call TriggerAddAction( point, local real x = ( GetOrderPointX() + GetRandomReal( 30, 60 ) )
...ect.
endfunction