- Joined
- May 1, 2008
- Messages
- 1,605
Moin moin =)
It's me again and I have a simple question. At all not simple for me, because if I try something
like this, it always gets buggy somehow.
As you see in the title, I want combine triggers. Let's say I have this two triggers:
Again, how must I do this, that I can use this in one trigger PLUS: I have more of this "Rect Enter" triggers, so I thought, that I need 3 globals for x,y and u (the triggerunit()). So how to combine all this, to one (bigger) good working trigger? =)
Greetings - Thanks - Peace
Dr. Boom
It's me again and I have a simple question. At all not simple for me, because if I try something
like this, it always gets buggy somehow.
As you see in the title, I want combine triggers. Let's say I have this two triggers:
JASS:
function Actions1 takes nothing returns nothing
local real x = GetRectCenterX(gg_rct_WhoKnows)
local real y = GetRectCenterY(gg_rct_WhoKnows)
call SetUnitX(GetTriggerUnit(),x)
call SetUnitY(GetTriggerUnit(),y)
endfunction
//===========================================================================
function InitTrig_Enter1 takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterEnterRectSimple(t,gg_rct_KnowsWho)
call TriggerAddAction(t,Actions1)
endfunction
JASS:
function Actions2 takes nothing returns nothing
local real x = GetRectCenterX(gg_rct_KnowsWho)
local real y = GetRectCenterY(gg_rct_KnowsWho)
call SetUnitX(GetTriggerUnit(),x)
call SetUnitY(GetTriggerUnit(),y)
endfunction
//===========================================================================
function InitTrig_Enter1 takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterEnterRectSimple(t,gg_rct_WhoKnows)
call TriggerAddAction(t,Actions2)
endfunction
Again, how must I do this, that I can use this in one trigger PLUS: I have more of this "Rect Enter" triggers, so I thought, that I need 3 globals for x,y and u (the triggerunit()). So how to combine all this, to one (bigger) good working trigger? =)
Greetings - Thanks - Peace
Dr. Boom