Expecting endifs?

wraithseeker

Tired.
Reaction score
122
it is
JASS:
scope
and not
JASS:
cope


it is
JASS:
scope Kamekameha initializer Init


Please check your code before posting it :mad:

Locals are only supported at the top of the function GOSH!!!!
 

saw792

Is known to say things. That is all.
Reaction score
280
JASS:
private function KSlide takes nothing returns nothing
        if ( Check1() ) then
        local unit array Laser
        local location s0 = GetUnitLoc(u0)
        ...


I swear I've told you this thirty times in the last few months. You can't have a damn if above a local declaration. You can't have ANYTHING above local declarations.
 

D.V.D

Make a wish
Reaction score
73
And that's why you read the posts before this to figure out what syntax errors I get when I put the function after the locals.
 

D.V.D

Make a wish
Reaction score
73
Its the same thing realy just the check1 was switched so its not above globals. Errors Im getting are from other triggers about timers and from this trigger and the first 2 globals it says must be initalized. Then it for some reason shows my variables with Kamehameha_ in front of them and for the Array global function were I set it to 1, it says cannot assign to constant Kamehameha_Array

JASS:

scope 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
        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 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 > 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, "spell slam" )
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, 'BTLF', 1.00 )
    call TriggerSleepAction( 0.10 )
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 0.00 )
    set i = 1
    set e = 10
    loop
        exitwhen i > e
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 100 )
    call SetUnitAnimation( gg_unit_H008_0015, "spell" )
    set size = 90.00
    set i = 1
    set e = 4
    loop
        exitwhen i > e
        set p2 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - size ))
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 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 > e
        call CreateNUnitsAtLoc( 1, 'h00D', GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call TriggerSleepAction( 0.20 )
    call CreateNUnitsAtLoc( 1, 'h00D', GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, 'BTLF', 1.00 )
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, 'BTLF', 1.00 )
    call TriggerSleepAction( 0.10 )
    set p2 = PolarProjectionBJ(p0, 200.00, GetUnitFacing(gg_unit_H008_0015))
    call CreateNUnitsAtLoc( 1, 'h00G', 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, 'h007', 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 > e
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h00B', 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, 'BTLF', 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

//===========================================================================
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
 

wraithseeker

Tired.
Reaction score
122
Didn't I mention that it should be

JASS:
scope kamekameha initializer Init


change all your function to private and in your Init function , change the name to init.
 

D.V.D

Make a wish
Reaction score
73
It cannot be Init because then you get a error saying cannot find initalizer.
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
JASS:
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

Errors:
* gg_unit_H008_0015 doesn't have a value when globals are initialized. The unit is created and assigned to the variable after global initialization.
* You must initialize constants at deceleration time. Since I doubt that you want that: remove the constant keyword.
* You can't have constant arrays (since arrays can't be initialized at deceleration).
 

D.V.D

Make a wish
Reaction score
73
Ok, changed that but the integer isn't a array, its just called Array with a capital so it doesn't get mixed up. Code:
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 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 > 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, "spell slam" )
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, 'BTLF', 1.00 )
    call TriggerSleepAction( 0.10 )
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 0.00 )
    set i = 1
    set e = 10
    loop
        exitwhen i > e
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 100 )
    call SetUnitAnimation( gg_unit_H008_0015, "spell" )
    set size = 90.00
    set i = 1
    set e = 4
    loop
        exitwhen i > e
        set p2 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - size ))
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 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 > e
        call CreateNUnitsAtLoc( 1, 'h00D', GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call TriggerSleepAction( 0.20 )
    call CreateNUnitsAtLoc( 1, 'h00D', GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, 'BTLF', 1.00 )
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, 'BTLF', 1.00 )
    call TriggerSleepAction( 0.10 )
    set p2 = PolarProjectionBJ(p0, 200.00, GetUnitFacing(gg_unit_H008_0015))
    call CreateNUnitsAtLoc( 1, 'h00G', 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, 'h007', 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 > e
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h00B', 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, 'BTLF', 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

//===========================================================================
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


The code doesn't have any errors anymore but I can't test it due to not being able to enable disabel syntax checker or any other option from girimoire revolving around the trigger editor. Any help on how to fix that?
 

wraithseeker

Tired.
Reaction score
122
due to not being able to enable disabel syntax checker or any other option from girimoire revolving around the trigger editor. Any help on how to fix that?

What do you mean? Are you using vJass Newgen? Is your trigger disabled or Enabled ??? Girmoire revolves around the trigger editor ?

And for pity's sake phyrex1an said that you cannot have constant arrays so why are u still putting it constant?
 

Jedimindtrixxx

┻━┻ ︵ ¯\(ツ)/¯ ︵ ┻━┻
Reaction score
168
shorten ur conditions, they look ugly with the ifs. (not fully needed but easier to read)
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
Ok, changed that but the integer isn't a array, its just called Array with a capital so it doesn't get mixed up.
Lol. Proof that bad variable names really is a problem :p

Anyway, your global code is still not correct.
JASS:
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

There is no Triggering Unit when globals are declared. Triggering Units only exists in code executed by trigger events that has a Triggering Unit.
You still can't have uninitialized constant variables.
 

D.V.D

Make a wish
Reaction score
73
God, read my posts fully. I said I changed it and it worked, no need to correct anything anymore. Now, I cna't use NewGen Girimoire because the map won't turn on. All I can do is enable TESH, Colorizer but nothing that allows enabeling triggers, not leting disabel triggers and removing syntax checker. So I want someone to test the map for me.
 

saw792

Is known to say things. That is all.
Reaction score
280
Uhh no D.V.D, you didn't say it worked you only said it didn't have syntax errors. Stop being an arsehole whenever somebody tells you something is wrong.

phyrex1an is telling you about something that will stop the spell from working at all and may even crash the game when you try to run the code. So before you come back here posting your code that doesn't work but doesn't have any syntax errors, take what some of the people have said on board. Don't just dismiss it because the syntax checker doesn't say things are wrong.
 

D.V.D

Make a wish
Reaction score
73
phrynexian didn't say that my code crashed the map. Im posting the map, just need to take out all my custom models.
 

wraithseeker

Tired.
Reaction score
122
Dude , the son goku don't even have the spell , anyway I fixed your code to have no synax error.

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 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 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 > 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, "spell slam" )
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, 'BTLF', 1.00 )
    call TriggerSleepAction( 0.10 )
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 0.00 )
    set i = 1
    set e = 10
    loop
        exitwhen i > e
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p1, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call SetUnitTimeScalePercent( gg_unit_H008_0015, 100 )
    call SetUnitAnimation( gg_unit_H008_0015, "spell" )
    set size = 90.00
    set i = 1
    set e = 4
    loop
        exitwhen i > e
        set p2 = PolarProjectionBJ(p0, 30.00, ( GetUnitFacing(gg_unit_H008_0015) - size ))
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 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 > e
        call CreateNUnitsAtLoc( 1, 'h00D', GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call TriggerSleepAction( 0.20 )
    call CreateNUnitsAtLoc( 1, 'h00D', GetOwningPlayer(gg_unit_H008_0015), p0, ( GetUnitFacing(gg_unit_H008_0015) + 90.00 ) )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, 'BTLF', 1.00 )
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
    set d = GetLastCreatedUnit()
    call PauseUnit( d, true )
    call UnitApplyTimedLife( d, 'BTLF', 1.00 )
    call TriggerSleepAction( 0.10 )
    set p2 = PolarProjectionBJ(p0, 200.00, GetUnitFacing(gg_unit_H008_0015))
    call CreateNUnitsAtLoc( 1, 'h00G', 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, 'h007', 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 > e
        call CreateNUnitsAtLocFacingLocBJ( 1, 'h00F', GetOwningPlayer(gg_unit_H008_0015), p2, p0 )
        set d = GetLastCreatedUnit()
        call PauseUnit( d, true )
        call UnitApplyTimedLife( d, 'BTLF', 1.00 )
        call TriggerSleepAction( 0.10 )
        set i = i + 1
    endloop
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h00B', 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, 'BTLF', 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

//===========================================================================
private function Init 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

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top