• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Infernal Cyclone v. 1.3.2.0

  • Like
Reactions: Daffa
Infernal Cyclone

Spell Info:
BOqWlWG.png


The Spell is Exclusive for KB3D, meaning it is made for using the KB3D system

For whoever wants to know, the third number in the version is for an update of the KB3D System without changes to the Spell

Enjoy using this Eye-Candy Spell :)

Credits:
  • -Credits for WILL THE ALMIGHTY for the FlameThrower Model
  • -Credits for UgoUgo for the OrbofFire Model
  • -Credits for aki15 for the PyroBlast Icon


Jrl7pXA.png

y66x.png

c2jRGhf.png

9yfgAzx.png

ud46.png

uQ2CmKF.png

auam.png

  • IC INIT
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Initialization of all the Variables --------
      • -------- Make Sure to Import the Icon --------
      • -------- You MUST Configure these values after importing because they will change --------
      • Set IC_Ability = Infernal Cyclone
      • Set IC_Dummy = IC Dummy
      • -------- End --------
      • -------- Possible Configurations of the Spell --------
      • -------- Effects --------
      • -------- Model Path of the Looping Missiles --------
      • Set IC_MissileFx = OrbOfFire.mdl
      • -------- Model Path of the Big Explosion --------
      • Set IC_Fx1 = Abilities\Weapons\DemolisherFireMissile\DemolisherFireMissile.mdl
      • -------- Model Path of the Shards created at the End of the Spell --------
      • Set IC_Fx2 = Flamethrower.mdl
      • -------- Model Path of the Small Explosion from the shards --------
      • Set IC_Fx3 = Abilities\Weapons\DemolisherFireMissile\DemolisherFireMissile.mdl
      • -------- End of Effects --------
      • -------- Z offset reached by the looping Missiles (Main Missiles) --------
      • Set IC_Zoffset[1] = 500.00
      • Set IC_Zoffset[2] = 600.00
      • Set IC_Zoffset[3] = 700.00
      • -------- Damage Dealt when the Falling Missile hits the ground --------
      • Set IC_EndDamage[1] = 100.00
      • Set IC_EndDamage[2] = 125.00
      • Set IC_EndDamage[3] = 150.00
      • -------- Damage dealt by Shards --------
      • Set IC_SpreadDamage[1] = 20.00
      • Set IC_SpreadDamage[2] = 40.00
      • Set IC_SpreadDamage[3] = 60.00
      • -------- AoE of the DPS dealt by the Looping Missiles --------
      • Set IC_DAoE[1] = 150.00
      • Set IC_DAoE[2] = 150.00
      • Set IC_DAoE[3] = 150.00
      • -------- DPS dealt by the Looping Missiles, in the DAoE --------
      • Set IC_DPS[1] = 20.00
      • Set IC_DPS[2] = 40.00
      • Set IC_DPS[3] = 60.00
      • -------- Amount of Looping Missiles --------
      • Set IC_Flames[1] = 18
      • Set IC_Flames[2] = 18
      • Set IC_Flames[3] = 18
      • -------- Total AoE of the Spell, AoE raeched by the Looping Missiles, and End Damage AoE --------
      • Set IC_AoE[1] = 300.00
      • Set IC_AoE[2] = 350.00
      • Set IC_AoE[3] = 400.00
      • -------- Amount of shards created at the end of the spell --------
      • Set IC_Shards[1] = 8
      • Set IC_Shards[2] = 12
      • Set IC_Shards[3] = 16
      • -------- AoE where the shards can be targeted --------
      • Set IC_XAoE[1] = (2.00 x IC_AoE[1])
      • Set IC_XAoE[2] = (2.00 x IC_AoE[2])
      • Set IC_XAoE[3] = (2.00 x IC_AoE[3])
      • -------- Allowed Targets, note that Structures are Mechanicals, so you may need to enable both of them to target structures --------
      • Set IC_Target_Allies = False
      • Set IC_Target_Magic_Imminue = False
      • Set IC_Target_Mechanicals = True
      • Set IC_Target_Structures = False
      • -------- Attack Type of the Damages --------
      • Set IC_AType = Magic
      • -------- Damage Type of the Damages --------
      • Set IC_DType = Magic
      • -------- Intelligent Targeting enables iKB, which makes the units get KBed and damaged if they are near the damager in Flying Heights --------
      • Set IC_iKB_IntelligentTargeting = True
      • -------- Destroys Trees around the Missiles all over the spell --------
      • Set IC_DestroyTree = True
      • -------- Delay for the Looping missiles to reach the Z offset, and the delay for the falling missile to reach the ground --------
      • -------- Note that This value is prefered to be maintained to 1.5, or else, the Effect of the spell will be ruined --------
      • Set IC_Delay[1] = 1.50
      • Set IC_Delay[2] = 1.50
      • Set IC_Delay[3] = 1.50
      • -------- End of Configurations --------
      • -------- Variable Creating --------
      • Skip remaining actions
      • Set IC_Instances = 0
      • Set IC_Counter = 0
      • Set IC_HA = IC_HA
      • Set IC_Timer = IC_Timer

JASS:
/////////////////////////////////////////////////////////////////////////////
//                                                                         //
//            Infernal Cyclone v. 1.3.1.0         [JASS - GUI]             //
//                                           by Jad AKA DotCa              //
//                                                                         //
/////////////////////////////////////////////////////////////////////////////
//                                                                         //
//            Credits and others                                           //
//                                                                         //
//    -This Spell uses Knock-Back 3D v. 1.7.1 for it's use, you can        //
//         choose to not import the KB3D Folder from the test map if       //
//         and only IF you have the same KB3D version or newer             //
//    -Credits for WILL THE ALMIGHTY for the FlameThrower Model            //
//    -Credits for UgoUgo for the OrbofFire Model                          //
//                                                                         //
/////////////////////////////////////////////////////////////////////////////
//                                                                         //
//         Importing Process                                               //
//                                                                         //
//   -Make Sure to Import the Icons in the test map for the spell          //
//   -Check that Create Unknown variables is checked in your WE preferences//
//  it can be found in:     File --> Preferences --> General               //
//   -Copy&Paste Infernal Cyclone Folder into your map                     //
//   -If and only IF you haven't the v. 1.7.1 of KB3D or later then CnP the//
//    Knock-Back 3D Folder into your map                                   //
//   -Create the nessesary dummy unit and import the Models to your map    //
//   -Configure IC_Dummy and IC_Ability to the right values                //
//   -Start Using the Spell!                                               //
//                                                                         //
/////////////////////////////////////////////////////////////////////////////

function IC_Loop takes nothing returns nothing
    local real T = 0
    local integer i = 1
    local unit U
    local unit U1
    local real x
    local real y
    local integer ix = 1
    local integer level
    loop
        exitwhen i > udg_IC_Counter
        if LoadBoolean(udg_IC_HA, i, 4) then
            set T = LoadReal(udg_IC_HA, i, 1)
            call SaveReal(udg_IC_HA, i, 1, T - 0.03125)
            if T <= 0.03125 then
                if LoadBoolean(udg_IC_HA, i, -1) then
                    set level = LoadInteger(udg_IC_HA, i, 0)
                    set x = LoadReal(udg_IC_HA, i, 2)
                    set y = LoadReal(udg_IC_HA, i, 3)
                    set U1 = LoadUnitHandle(udg_IC_HA, i, 5)
                    set U = CreateUnit(GetOwningPlayer(U1), udg_IC_Dummy, x, y, 0)
                    set udg_KB3D_AllowOutSiding = true
                    set udg_KB3D_Angle = 0
                    set udg_KB3D_AoE = udg_IC_AoE[level]
                    set udg_KB3D_AoEEndDamage = udg_IC_EndDamage[level]
                    set udg_KB3D_DamageType = udg_IC_DType
                    set udg_KB3D_AttackType = udg_IC_AType
                    set udg_KB3D_Damager = U1
                    set udg_KB3D_DestroyTree = udg_IC_DestroyTree
                    set udg_KB3D_AoEKB = true
                    set udg_KB3D_Range = 1
                    set udg_KB3D_Speed = 1/(udg_IC_Delay[level])
                    set udg_KB3D_Unit = U
                    set udg_KB3D_UnpathableStop = false
                    set udg_KB3D_Zoffset = 0
                    set udg_KB3D_KillatEnd = true
                    set udg_KB3D_iKB = false
                    set udg_KB3D_AoEDamage = udg_IC_DPS[level]
                    set udg_KB3D_D_MAGIC_IMMINUE = udg_IC_Target_Magic_Imminue
                    set udg_KB3D_D_ALLY = udg_IC_Target_Allies
                    set udg_KB3D_D_MECHANICAL = udg_IC_Target_Mechanicals
                    set udg_KB3D_D_STRUCTURE = udg_IC_Target_Structures
                    call TriggerEvaluate( udg_KB3D_Registration )
                    //
                    set U = CreateUnit(GetOwningPlayer(U1), udg_IC_Dummy, x, y, GetRandomReal(0,360))
                    call SaveEffectHandle(udg_IC_HA, i, 2, AddSpecialEffectTarget(udg_IC_MissileFx, U, "origin"))
                    call SaveReal(udg_IC_HA, i, 1, udg_IC_Delay[level])
                    call SaveReal(udg_IC_HA, i, 0, udg_IC_Delay[level])
                    call SaveReal(udg_IC_HA, i, 6, x)
                    call SaveReal(udg_IC_HA, i, 7, y)
                    call SavePlayerHandle(udg_IC_HA, i, 8, GetOwningPlayer(U1))
                    call SaveInteger(udg_IC_HA, i, 3, level)
                    call SaveBoolean(udg_IC_HA, i, -1, false)
                    call SetUnitFlyHeight(U, udg_IC_Zoffset[level], 0)
                    call SetUnitFlyHeight(U, 0, udg_IC_Zoffset[level]/(udg_IC_Delay[level]))
                    call SetUnitScale(U, 2, 0, 0)
                    call UnitApplyTimedLife(U, 'BTLF', udg_IC_Delay[level])
                    call RemoveSavedHandle(udg_IC_HA, i, 5)
                else
                    set level = LoadInteger(udg_IC_HA, i, 3)
                    set x = LoadReal(udg_IC_HA, i, 6)
                    set y = LoadReal(udg_IC_HA, i, 7)
                    call SaveBoolean(udg_IC_HA, i, 4, false)
                    call DestroyEffect(LoadEffectHandle(udg_IC_HA, i, 2))
                    set U = CreateUnit(Player(15), udg_IC_Dummy, x, y, 0)
                    call SetUnitScale(U, udg_IC_AoE[level]*0.008, 0, 0)
                    call DestroyEffect(AddSpecialEffectTarget(udg_IC_Fx1, U, "origin"))
                    call KillUnit(U)
                    //Boulders
                    loop
                        exitwhen ix == udg_IC_Shards[level]
                        set udg_KB3D_Angle = GetRandomReal(0,360)
                        set U = CreateUnit(LoadPlayerHandle(udg_IC_HA, i, 8), udg_IC_Dummy, x, y, udg_KB3D_Angle)
                        set udg_KB3D_AllowOutSiding = true
                        set udg_KB3D_AoE = udg_IC_DAoE[level]
                        set udg_KB3D_AoEEndDamage = udg_IC_SpreadDamage[level]
                        set udg_KB3D_DamageType = udg_IC_DType
                        set udg_KB3D_AttackType = udg_IC_AType
                        set udg_KB3D_Damager = U
                        set udg_KB3D_TrailFx = udg_IC_Fx2
                        set udg_KB3D_Fx_Attach = "origin"
                        set udg_KB3D_DestroyTree = udg_IC_DestroyTree
                        set udg_KB3D_Range = GetRandomReal(udg_IC_XAoE[level]/4, udg_IC_XAoE[level])
                        set udg_KB3D_Speed = 450
                        set udg_KB3D_Unit = U
                        set udg_KB3D_D_MAGIC_IMMINUE = udg_IC_Target_Magic_Imminue
                        set udg_KB3D_D_ALLY = udg_IC_Target_Allies
                        set udg_KB3D_D_MECHANICAL = udg_IC_Target_Mechanicals
                        set udg_KB3D_D_STRUCTURE = udg_IC_Target_Structures
                        set udg_KB3D_UnpathableStop = false
                        set udg_KB3D_Zoffset = udg_IC_Zoffset[level]/1.5
                        set udg_KB3D_EndFx = udg_IC_Fx3
                        set udg_KB3D_KillatEnd = true
                        set udg_KB3D_iKB = udg_IC_iKB_IntelligentTargeting
                        call TriggerEvaluate( udg_KB3D_Registration )
                        set ix = ix + 1
                    endloop
                    call FlushChildHashtable(udg_IC_HA, i)
                    set udg_IC_Instances = udg_IC_Instances - 1
                    if udg_IC_Instances == 0 then
                        call PauseTimer(udg_IC_Timer)
                        set udg_IC_Counter = 0
                    endif
                endif
            endif
        endif
        set i = i + 1
    endloop
    set U1 = null
    set U = null
endfunction

function IC_Cast takes nothing returns boolean
    local unit U
    local unit u1
    local integer level
    local integer i
    local real x
    local real y
    if GetSpellAbilityId() == udg_IC_Ability then
        set i = 0
        set U = GetTriggerUnit()
        set level = GetUnitAbilityLevel(U, udg_IC_Ability)
        set x = GetSpellTargetX()
        set y = GetSpellTargetY()
        set udg_IC_Instances = udg_IC_Instances + 1
        set udg_IC_Counter = udg_IC_Counter + 1
        call SaveInteger(udg_IC_HA, udg_IC_Counter, 0, level)
        call SaveReal(udg_IC_HA, udg_IC_Counter, 1, udg_IC_Delay[level])
        call SaveReal(udg_IC_HA, udg_IC_Counter, 2, x)
        call SaveReal(udg_IC_HA, udg_IC_Counter, 3, y)
        call SaveBoolean(udg_IC_HA, udg_IC_Counter, 4, true)
        call SaveBoolean(udg_IC_HA, udg_IC_Counter, -1, true)
        call SaveUnitHandle(udg_IC_HA, udg_IC_Counter, 5, U)
        set u1 = CreateUnit(Player(15), udg_IC_Dummy, x, y, 0)
        call SetUnitScale(u1, udg_IC_AoE[level]*0.008, 0, 0)
        call DestroyEffect(AddSpecialEffectTarget(udg_IC_Fx1, u1, "origin"))
        call KillUnit(u1)
        loop
            exitwhen i == udg_IC_Flames[level]
            //Register the KB3D
            set u1 = CreateUnit(GetTriggerPlayer(), udg_IC_Dummy, x, y, 0)
            set udg_KB3D_AllowOutSiding = true
            set udg_KB3D_Angle = 360/udg_IC_Flames[level] * i
            set udg_KB3D_AoE = udg_IC_DAoE[level]
            set udg_KB3D_Arc = udg_IC_Delay[level]*4
            set udg_KB3D_AoEDamage = udg_IC_DPS[level]
            set udg_KB3D_DamageType = udg_IC_DType
            set udg_KB3D_AttackType = udg_IC_AType
            set udg_KB3D_Damager = U
            set udg_KB3D_DestroyTree = udg_IC_DestroyTree
            set udg_KB3D_Range = udg_IC_Delay[level]*udg_IC_AoE[level]*2
            set udg_KB3D_Speed = udg_IC_AoE[level]
            set udg_KB3D_TrailFx = udg_IC_MissileFx
            set udg_KB3D_Fx_Attach = "origin"
            set udg_KB3D_Unit = u1
            set udg_KB3D_iKB = udg_IC_iKB_IntelligentTargeting
            set udg_KB3D_UnpathableStop = false
            set udg_KB3D_Zoffset = udg_IC_Zoffset[level]
            set udg_KB3D_KillatTime = udg_IC_Delay[level]
            set udg_KB3D_D_MAGIC_IMMINUE = udg_IC_Target_Magic_Imminue
            set udg_KB3D_D_ALLY = udg_IC_Target_Allies
            set udg_KB3D_D_MECHANICAL = udg_IC_Target_Mechanicals
            set udg_KB3D_D_STRUCTURE = udg_IC_Target_Structures
            call TriggerEvaluate( udg_KB3D_Registration )
            set i = i + 1
        endloop
        if (udg_IC_Counter == 1) then
            call TimerStart(udg_IC_Timer, 0.031250000, true, function IC_Loop )
        endif
        set U = null
        set u1 = null
    endif
    return false
endfunction

//===========================================================================
function InitTrig_Infernal_Cyclone takes nothing returns nothing
    local trigger T = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(T, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition( T, Condition( function IC_Cast ) )
    set udg_IC_HA = InitHashtable()
endfunction

v. 1.0.0.0
Release
v. 1.0.1.0
Trigger Optimization
v. 1.0.2.0
Trigger Optimization
v. 1.0.3.0
Bug Fix
v. 1.1.0.0

  • Attack Type and Damage Type are now configurable
  • Many Trigger Optimization
v. 1.1.1.1

  • Small Changes in the Spell's configs
  • Updated to KB3D v. 1.6.0 with iKB
v. 1.2.0.0

  • Updated with KB3D v. 1.6.X, used the new features like targets allowed
  • Small Trigger Changes
v. 1.2.1.0

  • Trigger Fixes
  • Bug Fixes
v. 1.2.2.0

  • Trigger Changes (Preloading)
  • Tooltip Changed
v. 1.3.0.0

  • Updated to KB3D v. 1.7.0
  • Icon Changed
  • Balanced
  • Better Instructions/Documentation
  • Possibility to configure iKB (damaging and KBing)
  • Possibility to configure Destroy Tree
  • Better Code
v. 1.3.1.0

  • Updated to KB3D v. 1.7.1
  • Spell Follow through time added, better casting experience
  • Trigger optimization
  • Changed Z offset from 650 to 500/600/700
v. 1.3.1.0

  • Updated to KB3D v. 1.8.3
  • I doubt there is more to enhance here :p


Keywords:
Infernal, Cyclone, Loop, Fire, KB3D, Loop, Eye-Candy
Contents

Infernal Cyclone (Map)

Reviews
Infernal Cyclone v. 1.3.0.0 | Reviewed by Maker | 26th October 2013 Concept[/COLOR]] The spell is quite creative, fun to cast and good looking Triggers[/COLOR]] Good configuration options No leaks and MUI Objects[/COLOR]] No...

Moderator

M

Moderator


Infernal Cyclone v. 1.3.0.0 | Reviewed by Maker | 26th October 2013

[COLOR="gray"

[COLOR="gray"

[COLOR="gray"

[COLOR="gray"

[COLOR="gray"

[COLOR="gray"

Concept[/COLOR]]
126248-albums6177-picture66521.png
The spell is quite creative, fun to cast and good looking
Triggers[/COLOR]]
126248-albums6177-picture66521.png
  • Good configuration options
  • No leaks and MUI
Objects[/COLOR]]
126248-albums6177-picture66521.png
  • No unnecessary objects
126248-albums6177-picture66523.png
  • There is no follow through time, casting animation looks bad
  • There ability uses "spell, channel" animation, but the hero does not
    have that animation
Effects[/COLOR]]
126248-albums6177-picture66521.png
  • The effect looks great and the movement of the fire is well done
Rating[/COLOR]]
CONCEPTTRIGGERSOBJECTSEFFECTSRATINGSTATUS
126248-albums6177-picture75360.jpg
126248-albums6177-picture75360.jpg
126248-albums6177-picture75359.jpg
126248-albums6177-picture75360.jpg
126248-albums6177-picture75359.jpg
APPROVED

[COLOR="gray"

[/TD]



Infernal Cyclone v. 1.2.0.0 | Reviewed by Maker | 23th Oct 2013

[COLOR="gray"

[COLOR="gray"

[COLOR="gray"

[COLOR="gray"

[COLOR="gray"

[COLOR="gray"

Concept[/COLOR]]
126248-albums6177-picture66521.png
The spell is quite creative, fun to cast and good looking
Triggers[/COLOR]]
126248-albums6177-picture66521.png
  • Good configuration options
  • No leaks and MUI
126248-albums6177-picture66522.png
  • The loop should not call the preload function
126248-albums6177-picture66523.png
  • Your initialization trigger has a leftover debug message
  • You can use TriggerRegisterAnyUnitEventBJ instead of writing
    the contents of that function yourself. Unless you hate red colour with a passion
  • Instead of a trigger, create a timer for preloading. Destroy the timer in the
    preload function
Objects[/COLOR]]
126248-albums6177-picture66521.png
  • No unnecessary objects
126248-albums6177-picture66523.png
  • Set the learned icon position to [0,2]
  • The learn tooltip could list the stats like standard Blizzard abilities do
  • There is no follow through time, casting animation looks bad
Effects[/COLOR]]
126248-albums6177-picture66521.png
  • The effect looks great and the movement of the fire is well done
Rating[/COLOR]]
CONCEPTTRIGGERSOBJECTSEFFECTSRATINGSTATUS
126248-albums6177-picture75360.jpg
126248-albums6177-picture75359.jpg
126248-albums6177-picture75359.jpg
126248-albums6177-picture75360.jpg
126248-albums6177-picture75359.jpg
NEEDS FIX

[COLOR="gray"

[/TD]
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
AddTriggerCondition remember?
I honestly don't, the code is too pro for me to read lol. Anyway, you can replace that with TriggerEvaluate, assuming your only using a triggercondition.
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
@chobibo, no i didn't it's the initial trigger in the first post

@hodenhelm, like malhorne said, this snippet is vJASS, the spell is and may rest JASS
Thanks, and the fps drop is common with my spells, it's not bad coding, it is HUGE eye-candy effects :)
so reducing that fps drop will eventually remove the eye-candyness of the spell (the thing i like most in spells)
 
Add
set udg_KB3D_DamageType = DAMAGE_TYPE_MAGIC
set udg_KB3D_AttackType = ATTACK_TYPE_MAGIC
set udg_KB3D_Fx_Attach = "origin"

on your configuration

this
JASS:
loop
        exitwhen index == bj_MAX_PLAYER_SLOTS
        call TriggerRegisterPlayerUnitEvent(T, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
        set index = index + 1
    endloop

instead of this

JASS:
loop
        call TriggerRegisterPlayerUnitEvent(T, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
        set index = index + 1
        exitwhen index == bj_MAX_PLAYER_SLOTS
    endloop

You forgot this line IC_Cast :p
call ConditionalTriggerExecute( udg_KB3D_Registration )
=>
You know that, i don't need to correct it.

Don't local varriable too much, optimized IC_Loop

this:

JASS:
 function IC_Loop takes nothing returns nothing
    local real T = 0
    local integer i = 1
    local unit U
    local unit U1
    local real x
    local real y
    local integer ix = 1
    local integer level
    loop
        exitwhen i > udg_IC_Counter
        if LoadBoolean(udg_IC_HA, i, 4) then
        set T = LoadReal(udg_IC_HA, i, 1) - 0.031250000
        call SaveReal(udg_IC_HA, i, 1, T)
        if T <= 0 then
            if LoadBoolean(udg_IC_HA, i, -1) then
                set level = LoadInteger(udg_IC_HA, i, 0)
                set x = LoadReal(udg_IC_HA, i, 2)
                set y = LoadReal(udg_IC_HA, i, 3)
                set U1 = LoadUnitHandle(udg_IC_HA, i, 5)
                set U = CreateUnit(GetOwningPlayer(U1), udg_IC_Dummy, x, y, 0)
                set udg_KB3D_AllowOutSiding = true
                set udg_KB3D_Angle = 0
                set udg_KB3D_AoE = udg_IC_AoE[level]
                set udg_KB3D_AoEEndDamage = udg_IC_EndDamage[level]
                set udg_KB3D_DamageType = DAMAGE_TYPE_MAGIC
                set udg_KB3D_AttackType = ATTACK_TYPE_MAGIC
                set udg_KB3D_Damager = U1
                set udg_KB3D_DestroyTree = true
                set udg_KB3D_AoEKB = true
                set udg_KB3D_Range = 1
                set udg_KB3D_Speed = 1/(udg_IC_Delay[level])
                set udg_KB3D_Unit = U
                set udg_KB3D_UnpathableStop = false
                set udg_KB3D_Zoffset = 0
                set udg_KB3D_KillatTime = udg_IC_Delay[level]
                call TriggerEvaluate( udg_KB3D_Registration )
                //
                set U = CreateUnit(GetOwningPlayer(U1), udg_IC_Dummy, x, y, GetRandomReal(0,360))
                call SaveEffectHandle(udg_IC_HA, i, 2, AddSpecialEffectTarget(udg_IC_MissileFx, U, "origin"))
                call SaveReal(udg_IC_HA, i, 1, udg_IC_Delay[level])
                call SaveReal(udg_IC_HA, i, 0, udg_IC_Delay[level])
                call SaveReal(udg_IC_HA, i, 6, x)
                call SaveReal(udg_IC_HA, i, 7, y)
                call SavePlayerHandle(udg_IC_HA, i, 8, GetOwningPlayer(U1))
                call SaveInteger(udg_IC_HA, i, 3, level)
                call SaveBoolean(udg_IC_HA, i, -1, false)
                call SetUnitFlyHeight(U, udg_IC_Zoffset[level], 0)
                call SetUnitFlyHeight(U, 0, udg_IC_Zoffset[level]/(udg_IC_Delay[level]))
                call SetUnitScale(U, 2, 0, 0)
                call UnitApplyTimedLife(U, 'BTLF', udg_IC_Delay[level])
                call RemoveSavedHandle(udg_IC_HA, i, 5)
            else
                set level = LoadInteger(udg_IC_HA, i, 3)
                set x = LoadReal(udg_IC_HA, i, 6)
                set y = LoadReal(udg_IC_HA, i, 7)
                call SaveBoolean(udg_IC_HA, i, 4, false)
                call DestroyEffect(LoadEffectHandle(udg_IC_HA, i, 2))
                set U = CreateUnit(Player(15), udg_IC_Dummy, x, y, 0)
                call SetUnitScale(U, udg_IC_AoE[level]*0.008, 0, 0)
                call DestroyEffect(AddSpecialEffectTarget(udg_IC_Fx1, U, "origin"))
                call KillUnit(U)
                //Boulders
                loop
                    exitwhen ix == udg_IC_Shards[level]
                    set udg_KB3D_Angle = GetRandomReal(0,360)
                    set U = CreateUnit(LoadPlayerHandle(udg_IC_HA, i, 8), udg_IC_Dummy, x, y, udg_KB3D_Angle)
                    set udg_KB3D_AllowOutSiding = true
                    set udg_KB3D_AoE = udg_IC_DAoE[level]
                    set udg_KB3D_AoEEndDamage = udg_IC_SpreadDamage[level]
                    set udg_KB3D_DamageType = DAMAGE_TYPE_MAGIC
                    set udg_KB3D_AttackType = ATTACK_TYPE_MAGIC
                    set udg_KB3D_Damager = U
                    set udg_KB3D_TrailFx = udg_IC_Fx2
                    set udg_KB3D_Fx_Attach = "origin"
                    set udg_KB3D_DestroyTree = true
                    set udg_KB3D_Range = GetRandomReal(udg_IC_XAoE[level]/4, udg_IC_XAoE[level])
                    set udg_KB3D_Speed = 450
                    set udg_KB3D_Unit = U
                    set udg_KB3D_UnpathableStop = false
                    set udg_KB3D_Zoffset = udg_IC_Zoffset[level]/1.5
                    set udg_KB3D_EndFx = udg_IC_Fx3
                    call TriggerEvaluate( udg_KB3D_Registration )
                    call UnitApplyTimedLife(U, 'BTLF', udg_KB3D_Time)
                    set ix = ix + 1
                endloop
                call FlushChildHashtable(udg_IC_HA, i)
                set udg_IC_Instances = udg_IC_Instances - 1
                if udg_IC_Instances == 0 then
                    call PauseTimer(udg_IC_Timer)
                    set udg_IC_Counter = 0
                    //call FlushParentHashtable(udg_IC_HA)
                endif
            endif
        endif
        endif
        set i = i + 1
    endloop
    set U = null
    set U1 = null
endfunction

instead of this

JASS:
 function IC_Loop takes nothing returns nothing
    local real T = 0
    local integer i = 1
    local unit U
    local unit U1
    local unit U2
    local unit u1
    local real x
    local real y
    local integer ix = 1
    local integer level
    loop
        exitwhen i > udg_IC_Counter
        if LoadBoolean(udg_IC_HA, i, 4) then
        set T = LoadReal(udg_IC_HA, i, 1) - 0.031250000
        call SaveReal(udg_IC_HA, i, 1, T)
        if T <= 0 then
            if LoadBoolean(udg_IC_HA, i, -1) then
                set level = LoadInteger(udg_IC_HA, i, 0)
                set x = LoadReal(udg_IC_HA, i, 2)
                set y = LoadReal(udg_IC_HA, i, 3)
                set U1 = LoadUnitHandle(udg_IC_HA, i, 5)
                set U = CreateUnit(GetOwningPlayer(U1), udg_IC_Dummy, x, y, 0)
                set udg_KB3D_AllowOutSiding = true
                set udg_KB3D_Angle = 0
                set udg_KB3D_AoE = udg_IC_AoE[level]
                set udg_KB3D_AoEEndDamage = udg_IC_EndDamage[level]
                set udg_KB3D_DamageType = DAMAGE_TYPE_MAGIC
                set udg_KB3D_AttackType = ATTACK_TYPE_MAGIC
                set udg_KB3D_Damager = U1
                set udg_KB3D_DestroyTree = true
                set udg_KB3D_AoEKB = true
                set udg_KB3D_Range = 1
                set udg_KB3D_Speed = 1/(udg_IC_Delay[level])
                set udg_KB3D_Unit = U
                set udg_KB3D_UnpathableStop = false
                set udg_KB3D_Zoffset = 0
                set udg_KB3D_KillatTime = udg_IC_Delay[level]
                call TriggerEvaluate( udg_KB3D_Registration )
                set U = null
                //
                set U2 = CreateUnit(GetOwningPlayer(U1), udg_IC_Dummy, x, y, GetRandomReal(0,360))
                call SaveEffectHandle(udg_IC_HA, i, 2, AddSpecialEffectTarget(udg_IC_MissileFx, U2, "origin"))
                call SaveReal(udg_IC_HA, i, 1, udg_IC_Delay[level])
                call SaveReal(udg_IC_HA, i, 0, udg_IC_Delay[level])
                call SaveReal(udg_IC_HA, i, 6, x)
                call SaveReal(udg_IC_HA, i, 7, y)
                call SavePlayerHandle(udg_IC_HA, i, 8, GetOwningPlayer(U1))
                call SaveInteger(udg_IC_HA, i, 3, level)
                call SaveBoolean(udg_IC_HA, i, -1, false)
                call SetUnitFlyHeight(U2, udg_IC_Zoffset[level], 0)
                call SetUnitFlyHeight(U2, 0, udg_IC_Zoffset[level]/(udg_IC_Delay[level]))
                call SetUnitScale(U2, 2, 0, 0)
                call UnitApplyTimedLife(U2, 'BTLF', udg_IC_Delay[level])
                set U1 = null
                set U2 = null
                call RemoveSavedHandle(udg_IC_HA, i, 5)
            else
                set level = LoadInteger(udg_IC_HA, i, 3)
                set x = LoadReal(udg_IC_HA, i, 6)
                set y = LoadReal(udg_IC_HA, i, 7)
                call SaveBoolean(udg_IC_HA, i, 4, false)
                call DestroyEffect(LoadEffectHandle(udg_IC_HA, i, 2))
                set u1 = CreateUnit(Player(15), udg_IC_Dummy, x, y, 0)
                call SetUnitScale(u1, udg_IC_AoE[level]*0.008, 0, 0)
                call DestroyEffect(AddSpecialEffectTarget(udg_IC_Fx1, u1, "origin"))
                call KillUnit(u1)
                set u1 = null
                //Boulders
                loop
                    exitwhen ix == udg_IC_Shards[level]
                    set udg_KB3D_Angle = GetRandomReal(0,360)
                    set u1 = CreateUnit(LoadPlayerHandle(udg_IC_HA, i, 8), udg_IC_Dummy, x, y, udg_KB3D_Angle)
                    set udg_KB3D_AllowOutSiding = true
                    set udg_KB3D_AoE = udg_IC_DAoE[level]
                    set udg_KB3D_AoEEndDamage = udg_IC_SpreadDamage[level]
                    set udg_KB3D_DamageType = DAMAGE_TYPE_MAGIC
                    set udg_KB3D_AttackType = ATTACK_TYPE_MAGIC
                    set udg_KB3D_Damager = u1
                    set udg_KB3D_TrailFx = udg_IC_Fx2
                    set udg_KB3D_Fx_Attach = "origin"
                    set udg_KB3D_DestroyTree = true
                    set udg_KB3D_Range = GetRandomReal(udg_IC_XAoE[level]/4, udg_IC_XAoE[level])
                    set udg_KB3D_Speed = 450
                    set udg_KB3D_Unit = u1
                    set udg_KB3D_UnpathableStop = false
                    set udg_KB3D_Zoffset = udg_IC_Zoffset[level]/1.5
                    set udg_KB3D_EndFx = udg_IC_Fx3
                    call TriggerEvaluate( udg_KB3D_Registration )
                    call UnitApplyTimedLife(u1, 'BTLF', udg_KB3D_Time)
                    set ix = ix + 1
                endloop
                call FlushChildHashtable(udg_IC_HA, i)
                set udg_IC_Instances = udg_IC_Instances - 1
                if udg_IC_Instances == 0 then
                    call PauseTimer(udg_IC_Timer)
                    set udg_IC_Counter = 0
                    //call FlushParentHashtable(udg_IC_HA)
                endif
            endif
        endif
        endif
        set i = i + 1
    endloop
    set U = null
    set U1 = null
    set U2 = null
    set u1 = null
endfunction

on IC_Cast
GetTriggerPlayer()
Instead
GetOwningPlayer(U)

Remove local unit u2

this
JASS:
 loop
            exitwhen i == udg_IC_Flames[level]
            //Register the KB3D
            set u1 = CreateUnit(GetTriggerPlayer(), udg_IC_Dummy, x, y, 0)
            set udg_KB3D_AllowOutSiding = true
            set udg_KB3D_Angle = 360/udg_IC_Flames[level] * i
            set udg_KB3D_AoE = udg_IC_DAoE[level]
            set udg_KB3D_Arc = udg_IC_Delay[level]*4
            set udg_KB3D_AoEDamage = udg_IC_DPS[level]
            set udg_KB3D_DamageType = DAMAGE_TYPE_MAGIC
            set udg_KB3D_AttackType = ATTACK_TYPE_MAGIC
            set udg_KB3D_Damager = U
            set udg_KB3D_DestroyTree = true
            set udg_KB3D_Range = udg_IC_Delay[level]*udg_IC_AoE[level]*2
            set udg_KB3D_Speed = udg_IC_AoE[level]
            set udg_KB3D_TrailFx = udg_IC_MissileFx
            set udg_KB3D_Fx_Attach = "origin"
            set udg_KB3D_Unit = u1
            set udg_KB3D_UnpathableStop = false
            set udg_KB3D_Zoffset = udg_IC_Zoffset[level]
            set udg_KB3D_KillatTime = udg_IC_Delay[level]
            call ConditionalTriggerExecute( udg_KB3D_Registration )
            set i = i + 1
        endloop

instead

JASS:
 loop
            exitwhen i == udg_IC_Flames[level]
            //Register the KB3D
            set u2 = CreateUnit(GetOwningPlayer(U), udg_IC_Dummy, x, y, 0)
            set udg_KB3D_AllowOutSiding = true
            set udg_KB3D_Angle = 360/udg_IC_Flames[level] * i
            set udg_KB3D_AoE = udg_IC_DAoE[level]
            set udg_KB3D_Arc = udg_IC_Delay[level]*4
            set udg_KB3D_AoEDamage = udg_IC_DPS[level]
            set udg_KB3D_DamageType = DAMAGE_TYPE_MAGIC
            set udg_KB3D_AttackType = ATTACK_TYPE_MAGIC
            set udg_KB3D_Damager = U
            set udg_KB3D_DestroyTree = true
            set udg_KB3D_Range = udg_IC_Delay[level]*udg_IC_AoE[level]*2
            set udg_KB3D_Speed = udg_IC_AoE[level]
            set udg_KB3D_TrailFx = udg_IC_MissileFx
            set udg_KB3D_Fx_Attach = "origin"
            set udg_KB3D_Unit = u2
            set udg_KB3D_UnpathableStop = false
            set udg_KB3D_Zoffset = udg_IC_Zoffset[level]
            set udg_KB3D_KillatTime = udg_IC_Delay[level]
            call ConditionalTriggerExecute( udg_KB3D_Registration )
            set i = i + 1
            set u2 = null
        endloop

and then: null U and u1 in the end of function :)....

That it's, 4/5 for great spell (Eye candy a little - When inferal fall, it look not cool too much :|).
 
Last edited:
Level 22
Joined
Sep 24, 2005
Messages
4,821
JASS:
loop
        exitwhen index == bj_MAX_PLAYER_SLOTS
        call TriggerRegisterPlayerUnitEvent(T, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
        set index = index + 1
    endloop
This is the same as this:
JASS:
loop
        call TriggerRegisterPlayerUnitEvent(T, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
        set index = index + 1
        exitwhen index == bj_MAX_PLAYER_SLOTS
    endloop

But, like Maker said, I'd use the TriggerRegisterAnyUnitEventBJ.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Nice and Excellent spell and you almost does use KB3D in the code xD, I'll rate it 4/5 and +Rep :D for nice system and spell.

Also a suggestion: Make the KB3D values to be configurable in the configuration trigger because some users want to change the speed, special effect, attachment fx and some booleans.
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
thanks for the feedback,

all the KB3D configurations are configurable man, only one isn't : set udg_KB3D_Speed = 450 for the shards at the end
other values like unpathable stop and so can't be configured or else they will ruin the spell ;)
And for the Love of HIVE, "origin" attach isn't configurable for the simple reason that the effects are attached on a dummy unit using the dummy model file...... it can't be changed to head or something!
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
you're welcome, and i forgot to mention something, all the values are configurable with only one: IC_Delay, everything turns around this, even that changing that value will ruin the Aspect of the Cyclone, this is how all the values are configured
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
The dummy has "origin", "chest" and "overhead" attachment points.

yes, but it doesn't matter -.-"
it's a dummy to attach the effect on it :/

EDIT: oh just realized my mistake in the first sentence, here it is now:

And for the Love of HIVE, "origin" attach isn't configurable for the simple reason that the effects are attached on a dummy unit using the dummy model file...... it doesn't matter if it is changed to head or something!
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
Update

v. 1.0.0.0
Release
v. 1.0.1.0
Trigger Optimization
v. 1.0.2.0
Trigger Optimization
v. 1.0.3.0
Bug Fix
v. 1.1.0.0
  • Attack Type and Damage Type are now configurable
  • Many Trigger Optimization
v. 1.1.1.1
  • Small Changes in the Spell's configs
  • Updated to KB3D v. 1.6.0 with iKB
 
Level 18
Joined
Sep 14, 2012
Messages
3,413
JASS:
        if LoadBoolean(udg_IC_HA, i, 4) then
        set T = LoadReal(udg_IC_HA, i, 1) - 0.031250000
        call SaveReal(udg_IC_HA, i, 1, T)
Indent please

JASS:
set U= null
//
set U = CreateUnit(GetOwningPlayer(U1), udg_IC_Dummy, x, y, GetRandomReal(0,360))

Why setting it to null ?

JASS:
set U = null
//Boulders
loop
    exitwhen ix == udg_IC_Shards[level]
    set udg_KB3D_Angle = GetRandomReal(0,360)
    set U = CreateUnit(LoadPlayerHandle(udg_IC_HA, i, 8), udg_IC_Dummy, x, y, udg_KB3D_Angle)

Again ?

JASS:
set u1 = null
loop
    exitwhen i == udg_IC_Flames[level]
    //Register the KB3D
    set u1 = CreateUnit(GetTriggerPlayer(), udg_IC_Dummy, x, y, 0)

Again xD ?

JASS:
if (( GetSpellAbilityId() == udg_IC_Ability ) ) then
->
JASS:
if GetSpellAbilityId() == udg_IC_Ability then
 
Top