Hi guys,
I'm encountering a big problem with triggers.
I've 2 trigger.
One of this is in GUI:
The problem is that the if doesn't fire with gg_rct_Center. It shows "HEY1" and stop.
If I change region, it works.
My region is here:
View attachment 351910
I thought it was cause of regions inside the biggest and I've done them smaller. I've changed name at regions with "CenterH1" and similar, but still it doesn't fire.
Can you help me to understand why?
Thank you <3
I'm encountering a big problem with triggers.
I've 2 trigger.
One of this is in GUI:
-
UnitEntersInSide
-
Events
-
Unit - A unit enters Region 042 <gen>
-
Unit - A unit enters Side Team 1 <gen>
-
Unit - A unit enters Side Team 2 <gen>
-
Unit - A unit enters Side Team 3 <gen>
-
Unit - A unit enters Side Team 4 <gen>
-
-
Conditions
-
((Triggering unit) is A structure) Equal to Falso
-
-
Actions
-
Custom script: call Trig_DispatchUnitMove_Actions(GetTriggerUnit())
-
-
Code:
function Trig_DispatchUnitMove_Actions takes unit unitToDispatch returns nothing
call DisplayTextToForce( GetPlayersAll(), "HEY1" )
if(RectContainsUnit(gg_rct_Center, unitToDispatch)) then
call DisplayTextToForce( GetPlayersAll(), "HEY2" )
call Trig_DispatchUnitFromCenter_Actions(unitToDispatch)
endif
set unitToDispatch = null
endfunction
The problem is that the if doesn't fire with gg_rct_Center. It shows "HEY1" and stop.
If I change region, it works.
My region is here:
View attachment 351910
I thought it was cause of regions inside the biggest and I've done them smaller. I've changed name at regions with "CenterH1" and similar, but still it doesn't fire.
Can you help me to understand why?
Thank you <3