Expecting endifs?

D.V.D

Make a wish
Reaction score
73
I made a function and the syntax expects endifs when I added If/Then/Elses. It expects endifs from the variables making it expect variable names from all functions using these variables.

JASS:
scope Kamehameha initializer Init

globals

private constant unit Caster = GetTriggerUnit()
//This is the main caster who revolves around the trigger and spell Kamehameha
private unit u0
//This is the first leading missile
private unit u1
//This is the second leading missile
private constant integer Array
//This is the array that counts in killing the laser and conditions for slide

endglobals

private function Check1 takes nothing returns boolean
    if ( not ( Array == 200 ) ) then
        return false
    endif
    return true
endfunction

private function Check2 takes nothing returns boolean
    if ( not ( Array != 200 ) ) then
        return false
    endif
    return true
endfunction

private function KSlide takes nothing returns nothing
        local unit array Laser
        local location s0 = GetUnitLoc(u0)
        local location s1 = GetUnitLoc(u1)
        local location s2 = PolarProjectionBJ(s0, 9.00, GetUnitFacing(gg_unit_H008_0015))
        local location s3 = PolarProjectionBJ(s1, 9.00, GetUnitFacing(gg_unit_H008_0015))
        local integer i
        local integer e
        local timer t = GetExpiredTimer()
        if ( Check1() ) then
           call SetUnitPositionLoc( u0, s2 )
           call SetUnitPositionLoc( u1, s3 )
           call CreateNUnitsAtLocFacingLocBJ( 1, 'h006', GetOwningPlayer(gg_unit_H008_0015), s2, s2 )
           set Laser[udg_Array] = GetLastCreatedUnit()
           call PauseUnit( Laser[udg_Array], true )
           call SetUnitTimeScale( Laser[Array], 0.00 )
           set udg_Array = Array + 1
           call TimerStart(t, 0.01, true, function KSlide)
           if ( Check2() ) then
               set i = 1
               set e = udg_Array
               loop
                   exitwhen i > e
                   call KillUnit( Laser<i> )
                   set Laser<i> = null
                   set i = i + 1
               endloop
        else
        endif
    else
    endif
endfunction

private function KActions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local unit u0
    local unit u1
    local unit d
    local location p0 = GetUnitLoc(gg_unit_H008_0015)
    local location p1 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - 90.00 ))
    local location p2
    local location p3
    local location p4
    local integer i = 1
    local integer e
    local real size
    local timer t = CreateTimer()
    call SetUnitAnimation( gg_unit_H008_0015, &quot;spell slam&quot; )
    call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call TriggerSleepAction( 0.10 )
    call SetUnitTimeScale( gg_unit_H008_0015, 0.00 )
    set i = 1
    set e = 10
    loop
        exitwhen i &gt; e
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call SetUnitTimeScale( gg_unit_H008_0015, 100 )
    call SetUnitAnimation( gg_unit_H008_0015, &quot;spell&quot; )
    set size = 90.00
    set i = 1
    set e = 4
    loop
        exitwhen i &gt; e
        set p2 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - size ))
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        set size = ( size - 22.50 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call SetUnitTimeScale( gg_unit_H008_0015, 0.00 )
    set i = 1
    set e = 2
    loop
        exitwhen i &gt; e
        call CreateNUnitsAtLoc( 1, &#039;h00D&#039;, GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call TriggerSleepAction( 0.20 )
    call CreateNUnitsAtLoc( 1, &#039;h00D&#039;, GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call TriggerSleepAction( 0.10 )
    set p2 = PolarProjectionBJ(p0, 200.00, GetUnitFacing(gg_unit_H008_0015))
    call CreateNUnitsAtLoc( 1, &#039;h00G&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set u0 = GetLastCreatedUnit()
    call PauseUnit( u0, true )
    call TriggerSleepAction( 0.10 )
    call CreateNUnitsAtLoc( 1, &#039;h007&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set u1 = GetLastCreatedUnit()
    call PauseUnit( u1, true )
    call SetUnitTimeScale( u1, 0.00 )
    set Array = 1
    call TimerStart(t, 0.01, true, function KSlide)
    set p2 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - size ))
    set i = 1
    set e = 10
    loop
        exitwhen i &gt; e
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00B&#039;, GetOwningPlayer(gg_unit_H008_0015), p3, p3 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call SetUnitScale( d, 100.00, 100.00, 100.00 )
    call KillUnit( u0 )
    call KillUnit( u1 )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call SetUnitTimeScale( gg_unit_H008_0015, 100 )
    call ResetUnitAnimation( gg_unit_H008_0015 )
    call RemoveLocation(p0)
    call RemoveLocation(p1)
    call RemoveLocation(p2)
    call RemoveLocation(p3)
    call RemoveLocation(p4)
    set Caster = null
    set u0 = null
    set u1 = null
    set d = null
endfunction

//===========================================================================
private function InitTrig_Kamehameha takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterPlayerKeyEventBJ( t, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
    call TriggerAddAction( t, function KActions )
endfunction

endscope</i></i>
 

D.V.D

Make a wish
Reaction score
73
What do you mean close in another trigger? This function isn't used in any other trigger.
 

D.V.D

Make a wish
Reaction score
73
JNGP doesn't work for me at all. When I open it (using vista) it says This Program has stopped working.
 

D.V.D

Make a wish
Reaction score
73
Thanks +rep. But what will I change with this code using vJass? Except add globals.
 
Reaction score
341
It will make JASSing 100x easier. Mainly because of TESH/Structs.

And you can get rid of all those bj's using tesh's function list.
 

D.V.D

Make a wish
Reaction score
73
I have only Bj's for the events which I will change and for Create Unit which im staying with because I relaly don't get X/Y's. I got errors for my globals. First global it says first global decleration here and for endglobal it says nested global. Here's the code:
JASS:
scope Kamehameha

globals

private constant unit Caster = gg_unit_H008_0015
//This is the main caster who revolves around the trigger and spell Kamehameha
private constant unit u0
//This is the first leading missile
private constant unit u1
//This is the second leading missile
private constant integer Array
//This is the array that counts in killing the laser and conditions for slide
globals

private function Check1 takes nothing returns boolean
    if ( not ( Array == 200 ) ) then
        return false
    endif
    return true
endfunction

private function Check2 takes nothing returns boolean
    if ( not ( Array != 200 ) ) then
        return false
    endif
    return true
endfunction

private function KSlide takes nothing returns nothing
    if ( Check1() ) then
        local unit array Laser
        local location s0 = GetUnitLoc(u0)
        local location s1 = GetUnitLoc(u1)
        local location s2 = PolarProjectionBJ(s0, 9.00, GetUnitFacing(gg_unit_H008_0015))
        local location s3 = PolarProjectionBJ(s1, 9.00, GetUnitFacing(gg_unit_H008_0015))
        local integer i
        local integer e
        local timer t = GetExpiredTimer()
        call SetUnitPositionLoc( u0, s2 )
        call SetUnitPositionLoc( u1, s3 )
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h006&#039;, GetOwningPlayer(gg_unit_H008_0015), s2, s2 )
        set Laser[udg_Array] = GetLastCreatedUnit()
        call PauseUnit( Laser[udg_Array], true )
        call SetUnitTimeScalePercent( Laser[Array], 0.00 )
        set udg_Array = Array + 1
        call TimerStart(t, 0.01, true, function KSlide)
        if ( Check2() ) then
            set i = 1
            set e = udg_Array
            loop
                exitwhen i &gt; e
                call KillUnit( Laser[GetForLoopIndexA()] )
                set Laser[GetForLoopIndexA()] = null
                set i = i + 1
            endloop
        else
        endif
    else
    endif
endfunction

private function KActions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local unit u0
    local unit u1
    local unit d
    local location p0 = GetUnitLoc(gg_unit_H008_0015)
    local location p1 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - 90.00 ))
    local location p2
    local location p3
    local location p4
    local integer i = 1
    local integer e
    local real size
    local timer t = CreateTimer()
    call SetUnitAnimation( gg_unit_H008_0015, &quot;spell slam&quot; )
    call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call TriggerSleepAction( 0.10 )
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 0.00 )
    set i = 1
    set e = 10
    loop
        exitwhen i &gt; e
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 100 )
    call SetUnitAnimation( gg_unit_H008_0015, &quot;spell&quot; )
    set size = 90.00
    set i = 1
    set e = 4
    loop
        exitwhen i &gt; e
        set p2 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - size ))
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        set size = ( size - 22.50 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 0.00 )
    set i = 1
    set e = 2
    loop
        exitwhen i &gt; e
        call CreateNUnitsAtLoc( 1, &#039;h00D&#039;, GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call TriggerSleepAction( 0.20 )
    call CreateNUnitsAtLoc( 1, &#039;h00D&#039;, GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call TriggerSleepAction( 0.10 )
    set p2 = PolarProjectionBJ(p0, 200.00, GetUnitFacing(gg_unit_H008_0015))
    call CreateNUnitsAtLoc( 1, &#039;h00G&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set u0 = GetLastCreatedUnit()
    call PauseUnit( u0, true )
    call TriggerSleepAction( 0.10 )
    call CreateNUnitsAtLoc( 1, &#039;h007&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set u1 = GetLastCreatedUnit()
    call PauseUnit( u1, true )
    call SetUnitTimeScalePercent( u1, 0.00 )
    set Array = 1
    call TimerStart(t, 0.01, true, function KSlide)
    set p2 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - size ))
    set i = 1
    set e = 10
    loop
        exitwhen i &gt; e
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00B&#039;, GetOwningPlayer(gg_unit_H008_0015), p3, p3 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call SetUnitScalePercent( d, 100.00, 100.00, 100.00 )
    call KillUnit( u0 )
    call KillUnit( u1 )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 100 )
    call ResetUnitAnimation( gg_unit_H008_0015 )
    call RemoveLocation(p0)
    call RemoveLocation(p1)
    call RemoveLocation(p2)
    call RemoveLocation(p3)
    call RemoveLocation(p4)
    set Caster = null
    set u0 = null
    set u1 = null
    set d = null
endfunction

//===========================================================================
function InitTrig_Kamehameha takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterPlayerKeyEventBJ( t, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
    call TriggerAddAction( t, function KActions )
endfunction


EDIT: Girimoire doesn't work at all. When testing map, it puts you to the TFT main page. Won't let you test map and I tried the work on patch 1.21. Why?
 
Reaction score
341
... Scopes are used like this

JASS:
scope name initializer yourinitfunction

endscope


..Globals are used like this

JASS:
globals

endglobals


Read the manual plox..
 

D.V.D

Make a wish
Reaction score
73
My initalization function? Its called Initalization but when I put it as initalization for my init function, it says cannot find the init function. Also, I can't test my map because the disabel world editor syntax is enabeld, don't let WE disabel triggers and Always allow trigger enabel but without those functions, I can't test my code.
 

D.V.D

Make a wish
Reaction score
73
Once I did that is says locals are only supported on the top. Here's the code:
JASS:

private function KSlide takes nothing returns nothing
        if ( Check1() ) then
        local unit array Laser
        local location s0 = GetUnitLoc(u0)
        local location s1 = GetUnitLoc(u1)
        local location s2 = PolarProjectionBJ(s0, 9.00, GetUnitFacing(gg_unit_H008_0015))
        local location s3 = PolarProjectionBJ(s1, 9.00, GetUnitFacing(gg_unit_H008_0015))


I put the check after the locals but I got like 5 other errors. And do you know how to solve the girimoire thing?
 

D.V.D

Make a wish
Reaction score
73
When I move the other function from the top, all my globals are underlined saying globals aren't globalized or something like that and another function.
 

D.V.D

Make a wish
Reaction score
73
Here you go.

JASS:
cope Kamehameha initializer InitTrig_Kamehameha

globals

private constant unit Caster = gg_unit_H008_0015
//This is the main caster who revolves around the trigger and spell Kamehameha
private constant unit u0
//This is the first leading missile
private constant unit u1
//This is the second leading missile
private constant integer Array
//This is the array that counts in killing the laser and conditions for slide

endglobals

private function Check1 takes nothing returns boolean
    if ( not ( Array == 200 ) ) then
        return false
    endif
    return true
endfunction

private function Check2 takes nothing returns boolean
    if ( not ( Array != 200 ) ) then
        return false
    endif
    return true
endfunction

private function KSlide takes nothing returns nothing
        if ( Check1() ) then
        local unit array Laser
        local location s0 = GetUnitLoc(u0)
        local location s1 = GetUnitLoc(u1)
        local location s2 = PolarProjectionBJ(s0, 9.00, GetUnitFacing(gg_unit_H008_0015))
        local location s3 = PolarProjectionBJ(s1, 9.00, GetUnitFacing(gg_unit_H008_0015))
        local integer i
        local integer e
        local timer t = GetExpiredTimer()
        call SetUnitPositionLoc( u0, s2 )
        call SetUnitPositionLoc( u1, s3 )
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h006&#039;, GetOwningPlayer(gg_unit_H008_0015), s2, s2 )
        set Laser[udg_Array] = GetLastCreatedUnit()
        call PauseUnit( Laser[udg_Array], true )
        call SetUnitTimeScalePercent( Laser[Array], 0.00 )
        set udg_Array = Array + 1
        call TimerStart(t, 0.01, true, function KSlide)
        if ( Check2() ) then
            set i = 1
            set e = udg_Array
            loop
                exitwhen i &gt; e
                call KillUnit( Laser[GetForLoopIndexA()] )
                set Laser[GetForLoopIndexA()] = null
                set i = i + 1
            endloop
        else
        endif
    else
    endif
endfunction

private function KActions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local unit u0
    local unit u1
    local unit d
    local location p0 = GetUnitLoc(gg_unit_H008_0015)
    local location p1 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - 90.00 ))
    local location p2
    local location p3
    local location p4
    local integer i = 1
    local integer e
    local real size
    local timer t = CreateTimer()
    call SetUnitAnimation( gg_unit_H008_0015, &quot;spell slam&quot; )
    call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call TriggerSleepAction( 0.10 )
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 0.00 )
    set i = 1
    set e = 10
    loop
        exitwhen i &gt; e
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 100 )
    call SetUnitAnimation( gg_unit_H008_0015, &quot;spell&quot; )
    set size = 90.00
    set i = 1
    set e = 4
    loop
        exitwhen i &gt; e
        set p2 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - size ))
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        set size = ( size - 22.50 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 0.00 )
    set i = 1
    set e = 2
    loop
        exitwhen i &gt; e
        call CreateNUnitsAtLoc( 1, &#039;h00D&#039;, GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call TriggerSleepAction( 0.20 )
    call CreateNUnitsAtLoc( 1, &#039;h00D&#039;, GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call TriggerSleepAction( 0.10 )
    set p2 = PolarProjectionBJ(p0, 200.00, GetUnitFacing(gg_unit_H008_0015))
    call CreateNUnitsAtLoc( 1, &#039;h00G&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set u0 = GetLastCreatedUnit()
    call PauseUnit( u0, true )
    call TriggerSleepAction( 0.10 )
    call CreateNUnitsAtLoc( 1, &#039;h007&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set u1 = GetLastCreatedUnit()
    call PauseUnit( u1, true )
    call SetUnitTimeScalePercent( u1, 0.00 )
    set Array = 1
    call TimerStart(t, 0.01, true, function KSlide)
    set p2 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - size ))
    set i = 1
    set e = 10
    loop
        exitwhen i &gt; e
        call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00F&#039;, GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call CreateNUnitsAtLocFacingLocBJ( 1, &#039;h00B&#039;, GetOwningPlayer(gg_unit_H008_0015), p3, p3 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call SetUnitScalePercent( d, 100.00, 100.00, 100.00 )
    call KillUnit( u0 )
    call KillUnit( u1 )
    call UnitApplyTimedLife( d, &#039;BTLF&#039;, 1.00 )
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 100 )
    call ResetUnitAnimation( gg_unit_H008_0015 )
    call RemoveLocation(p0)
    call RemoveLocation(p1)
    call RemoveLocation(p2)
    call RemoveLocation(p3)
    call RemoveLocation(p4)
    set Caster = null
    set u0 = null
    set u1 = null
    set d = null
endfunction

//===========================================================================
function InitTrig_Kamehameha takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterPlayerKeyEventBJ( t, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
    call TriggerAddAction( t, function KActions )
endfunction

endscope
 
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