GT Unable to register?

RaiJin

New Member
Reaction score
40
JASS:
private function INIT takes nothing returns nothing
    local integer i = 1
    local trigger t1 = CreateTrigger()
    local trigger t2 = CreateTrigger()
    loop
        exitwhen i == 4
        call TriggerAddAction( GT_RegisterStartsEffectEvent( t1, Mask_zGETSUGA_ID<i> ), function ACTS )
        call TriggerAddAction( GT_RegisterStartsEffectEvent( t2, Mask_zGETSUGA_NEW_ID<i> ), function ACTS )
        set i = i + 1
    endloop
    call TriggerRegisterAnyUnitDamaged( GETSUGA_RETALIATE )
    call TriggerAddCondition( GETSUGA_RETALIATE, Condition( function RETALIATE ) )
endfunction</i></i>
theres my init func heres my ACTS func

JASS:
private function ACTS takes nothing returns nothing
    local location LOC = GetSpellTargetLoc()
    call BJDebugMsg(&quot;HELLO&quot;)
    call KT_Add( function handler, Getsuga.create( false, GetTriggerUnit(), GetLocationX( LOC ), GetLocationY( LOC ) ), TIMEOUT )
    call RemoveLocation( LOC )
    set LOC = null
endfunction


heres the integers i declared for the abilities ID

JASS:
private function i takes nothing returns nothing
    local integer g = 1
    set zGETSUGA_ID[1] = &#039;A00X&#039;
    set zGETSUGA_ID[2] = &#039;A00Q&#039;
    set zGETSUGA_ID[3] = &#039;A00L&#039;
    set zGETSUGA_ID[4] = &#039;A00Z&#039;
    set zGETSUGA_NEW_ID[1] = &#039;A010&#039;
    set zGETSUGA_NEW_ID[2] = &#039;A011&#039;
    set zGETSUGA_NEW_ID[3] = &#039;A00Y&#039;
    set zGETSUGA_NEW_ID[4] = &#039;A012&#039;
    set zGETSUGA_CD_ID[1] = &#039;A018&#039;
    set zGETSUGA_CD_ID[2] = &#039;A017&#039;
    set zGETSUGA_CD_ID[3] = &#039;A00N&#039;
    set zGETSUGA_CD_ID[4] = &#039;A013&#039;
    set zGETSUGA_CD_ID[5] = &#039;A019&#039;
    set zGETSUGA_CD_ID[6] = &#039;A015&#039;
    set zGETSUGA_CD_ID[7] = &#039;A016&#039;
    set zGETSUGA_CD_ID[8] = &#039;A014&#039;
    call TriggerAddAction( GT_RegisterStartsEffectEvent( CreateTrigger(), RAW_ID ), function acts )
    call TriggerAddAction( GT_RegisterLearnsAbilityEvent( CreateTrigger(), GETSUGA_LEARN_ID ), function LEARN )
    loop
        exitwhen g == 4
        call TriggerAddAction( GT_RegisterStartsEffectEvent( CreateTrigger(), zGETSUGA_ID[g] ), function GETSUGA_ID_FUNC )
        call TriggerAddAction( GT_RegisterStartsEffectEvent( CreateTrigger(), zGETSUGA_NEW_ID[g] ), function GETSUGA_NEW_ID_FUNC )
        set g = g + 1
    endloop
endfunction


basically nothing happens at all :/ no Debug msg no nothing :/ i tried specificly putting in the integer abilicode like 'A00X' but still nothing :/
 

XeNiM666

I lurk for pizza
Reaction score
138
GT requires an action function that returns boolean. The function must have a "return false" at the bottom.

Also:
I recommend using GT_Add instead of GT_Register
 

Kenny

Back for now.
Reaction score
202
GT requires an action function that returns boolean. The function must have a "return false" at the bottom.

GT_Add functions require actions to return a boolean value (as they are converted to conditions functions).

GT_Register does not require you to do that. It is handy when you need more than one event per trigger. You register multiple events of the same trigger using GT_Register, then use a TriggerAction or TriggerCondition for the actions part of the trigger.

I don't really see whats wrong with the script. Did you make sure you have the libraries in the correct order and whatnot?
 

XeNiM666

I lurk for pizza
Reaction score
138
Really? Boy im stupid. :p

Anyways, try setting the variable "g" and "i" to 0 when you localize it.
Also:
1. Are you that the Raw codes are correct?
2. Are you sure your using the right events?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top