Snowball Fountain v1.2a GUI

This bundle is marked as approved. It works and satisfies the submission rules.
[TD] SNOWBALL FOUNTAIN [ GUI ] [/TD]
SPELL DESCRIPTION:
full

[TD] SPELL IMAGES: [/TD]

Snowball Fountain! ( Default )

Snowball Fountain! ( Rotating )

Additional Fountain ( Modified for FUN! )


Normal Snowball Fountain
full

Insane Snowball Fountain
full

Disastrous Snowball Fountain
full

It is not clear in this image but try to test it in game. SnowballRotation = True ( Configuration Trigger )
full

THE NORMAL FOUNTAIN OF DEATH! ( These angles are privately modified into 270 degrees for better viewing )
full

THE INSANE FOUNTAIN OF DEATH!
full

THE DISASTROUS FOUNTAIN OF DEATH!!!
full

[TD] CHANGELOGS :[/TD][TD]
v1.0 - Released
v1.0a - Fountain Angles are now random
v1.1 - Updated, based on KILLCIDE review.
v1.2 - Spell code and performance improved.
v1.2a - Minor changes.[/TD]
[TD] CREDITS :[/TD][TD]
Jad ( KB3D System )
[/TD]

Snowball Fountain Configuration

Snowball Fountain Execution

Snowball Fountain Loop

  • Snowball Fountain Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- SPELL CONFIGURATION FIELD --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- OBJECT EDITOR ( F6 ) --------
      • -------- The spell or ability used in the triggers. ( Strictly Import the Snowball Fountain Ability ) --------
      • Set SF_Ability = Snowball Fountain
      • -------- The dummy unit used in the triggers. ( Strictly Import the Snowball Fountain Dummy Unit ) --------
      • Set SF_DummyType = Snowball Fountain Dummy
      • -------- The shadow of the dummy unit is disabled. You can enable it to be realistic, OBJECT EDITOR ( F6 ) ( Shadow Image - Flyer ) --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- SPELL DATA --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The maximum level of the Snowball Fountain ability. --------
      • Set SF_AbilityMaxLevel = 3
      • -------- ^ Specific levels are referenced as an array number or value in their respective variable array slots: Level 1 = [ 1 ], Level 2 = [ 2 ], Level 3 = [ 3 ]. --------
      • -------- ^ Modify at your own risk: the value must be equal to the max levels of the Snowball Fountain ability, uncorrect value can cause error. --------
      • -------- --------
      • -------- TRUE = YES, FALSE = NO --------
      • -------- Destroy Trees? --------
      • Set SF_DestroyTrees = True
      • -------- Damage Structures or Buildings? --------
      • Set SF_DamageStructures = True
      • -------- Damage Mechanical Units? --------
      • Set SF_DamageMechanical = True
      • -------- --------
      • -------- The attack and damage type of the spell. --------
      • Set SF_SnowballAttackType = Magic
      • Set SF_SnowballDamageType = Cold
      • -------- --------
      • -------- The interval of the looping trigger. * Recommended Value: 0.04 = for a great spell performance. --------
      • Set SF_PeriodicInterval = 0.05
      • -------- ^ Modify at your own risk: Lowering this value causes smooth looping BUT serious lags because of the large amount of units used. --------
      • -------- ^ You don't have to lower this value because the motions looping depends on the KB3D System. --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- FOUNTAIN DATA --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The model of the fountain and where to attach it. ( frost portal ) --------
      • Set SF_FrostModel = Abilities\Weapons\ZigguratFrostMissile\ZigguratFrostMissile.mdl
      • Set SF_FrostModelAttach = origin
      • -------- --------
      • -------- The size of the fountain. ( frost portal ) --------
      • Set SF_FrostSize[1] = 2.75
      • Set SF_FrostSize[2] = 3.50
      • Set SF_FrostSize[3] = 5.00
      • -------- --------
      • -------- The duration of the fountain. ( frost portal ) --------
      • Set SF_Duration[1] = 6.00
      • Set SF_Duration[2] = 8.00
      • Set SF_Duration[3] = 10.00
      • -------- --------
      • -------- The height of the fountain. ( frost portal ) --------
      • Set SF_FrostHeight[1] = 150.00
      • Set SF_FrostHeight[2] = 175.00
      • Set SF_FrostHeight[3] = 200.00
      • -------- --------
      • -------- The collision or area of the fountain. ( frost portal ) --------
      • Set SF_FrostCollision[1] = 175.00
      • Set SF_FrostCollision[2] = 225.00
      • Set SF_FrostCollision[3] = 275.00
      • -------- --------
      • -------- The looping damage from the collision or area of the fountain. ( frost portal ) --------
      • Set SF_FrostDamage[1] = 4.00
      • Set SF_FrostDamage[2] = 6.00
      • Set SF_FrostDamage[3] = 8.00
      • -------- --------
      • -------- An effect occurs at the fountain ( frost portal ) when producing snowballs and where to attach it. --------
      • Set SF_SpawnSnowballFx = Abilities\Weapons\ZigguratFrostMissile\ZigguratFrostMissile.mdl
      • Set SF_SpawnSnowballFxAttach = origin
      • -------- --------
      • -------- The amount of the snowball that the fountain produces per loop time. --------
      • Set SF_SnowballAmount[1] = 3
      • Set SF_SnowballAmount[2] = 4
      • Set SF_SnowballAmount[3] = 5
      • -------- ^ Modify at your own risk: value =! 0, the value must be greater than 0. --------
      • -------- --------
      • -------- The interval looping of producing snowballs. --------
      • Set SF_SpawnSnowballInterval[1] = 0.15
      • Set SF_SpawnSnowballInterval[2] = 0.15
      • Set SF_SpawnSnowballInterval[3] = 0.15
      • -------- --------
      • -------- Rotate the shower of snowballs? True = Yes, False = No --------
      • Set SF_SnowballRotate = False
      • -------- ^IF: True = The spinning fountain angle speed of producing snowball. --------
      • Set SF_SnowballFountainSpinSpeed[1] = 6.00
      • Set SF_SnowballFountainSpinSpeed[2] = 4.00
      • Set SF_SnowballFountainSpinSpeed[3] = 2.00
      • -------- --------
      • -------- The fountain's ( frost portal ) exiting missiles model and where to attach it. --------
      • Set SF_FrostPortalMissileModel = Abilities\Spells\Undead\FreezingBreath\FreezingBreathMissile.mdl
      • Set SF_FrostPMMAttach = origin
      • -------- --------
      • -------- The amount of producing fountain's ( frost portal ) exiting missiles. --------
      • Set SF_FrostPortalMissileAmount[1] = 1
      • Set SF_FrostPortalMissileAmount[2] = 3
      • Set SF_FrostPortalMissileAmount[3] = 5
      • -------- ^ Modify at your own risk: value =! 0, the value must be greater than 0. --------
      • -------- --------
      • -------- The collision size of the fountain ( frost portal ) exiting missiles. --------
      • Set SF_FrostPortalMissileCollision[1] = 75.00
      • Set SF_FrostPortalMissileCollision[2] = 125.00
      • Set SF_FrostPortalMissileCollision[3] = 150.00
      • -------- --------
      • -------- The damage of the fountain's ( frost portal ) exiting missiles. --------
      • Set SF_FrostPortalMissileDamage[1] = 25.00
      • Set SF_FrostPortalMissileDamage[2] = 50.00
      • Set SF_FrostPortalMissileDamage[3] = 75.00
      • -------- --------
      • -------- The speed of the fountain's ( frost portal ) missiles. --------
      • Set SF_FrostPortalMissileSpeed[1] = 0.00
      • Set SF_FrostPortalMissileSpeed[2] = 400.00
      • Set SF_FrostPortalMissileSpeed[3] = 700.00
      • -------- --------
      • -------- The acceleration speed of exiting missiles. --------
      • Set SF_FrostPortalMissileAccel[1] = 100.00
      • Set SF_FrostPortalMissileAccel[2] = 100.00
      • Set SF_FrostPortalMissileAccel[3] = 100.00
      • -------- --------
      • -------- The interval of exiting the portal of the frost portal missiles. --------
      • Set SF_FrostPortalMissileInterval[1] = 0.10
      • Set SF_FrostPortalMissileInterval[2] = 1.75
      • Set SF_FrostPortalMissileInterval[3] = 2.00
      • -------- --------
      • -------- An effect occurs when the exiting missiles finally reached the desired distance. --------
      • Set SF_FrostPortalMissileEndFx = Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
      • -------- --------
      • -------- Rotate fountain's ( frost portal ) exiting missile? True = Yes, False = No --------
      • Set SF_FrostPortalMissileRotate = True
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- SNOWBALL DATA --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The model of the snowball and where to attach it. Gives credits to Nara-shikamaru for this model. ( Import the snowball.mdx. IMPORT MANAGER ( F12 ) ) --------
      • Set SF_SnowballModel = war3mapImported\snowball.mdx
      • Set SF_SnowballModelAttach = origin
      • -------- --------
      • -------- The size of the snowball. --------
      • Set SF_SnowballSize[1] = 0.90
      • Set SF_SnowballSize[2] = 0.80
      • Set SF_SnowballSize[3] = 0.80
      • -------- --------
      • -------- The max height of the snowball. --------
      • Set SF_SnowballMaxHeight[1] = 370.00
      • Set SF_SnowballMaxHeight[2] = 370.00
      • Set SF_SnowballMaxHeight[3] = 370.00
      • -------- --------
      • -------- The speed of the snowball. --------
      • Set SF_SnowballSpeed[1] = 300.00
      • Set SF_SnowballSpeed[2] = 325.00
      • Set SF_SnowballSpeed[3] = 350.00
      • -------- --------
      • -------- The area of effect value ( radius ) of the spell. ( Must be equal to area of effect values of Snowball Fountain Ability. Object Editor ( F6 ) ) --------
      • Set SF_Radius[1] = 400.00
      • Set SF_Radius[2] = 415.00
      • Set SF_Radius[3] = 425.00
      • -------- --------
      • -------- The acceleration of the snowball. ( Only NEGATIVE Values ) --------
      • Set SF_SnowballAcceleration[1] = -80.00
      • Set SF_SnowballAcceleration[2] = -80.00
      • Set SF_SnowballAcceleration[3] = -80.00
      • -------- --------
      • -------- The collision of the snowball. --------
      • Set SF_SnowballCollision[1] = 175.00
      • Set SF_SnowballCollision[2] = 150.00
      • Set SF_SnowballCollision[3] = 150.00
      • -------- --------
      • -------- The damage of the snowball when lands in the ground. --------
      • Set SF_SnowballLandDamage[1] = 20.00
      • Set SF_SnowballLandDamage[2] = 30.00
      • Set SF_SnowballLandDamage[3] = 40.00
      • -------- --------
      • -------- An effect occurs when the snowball lands or touches the ground or floor. --------
      • Set SF_SnowballLandFx = Abilities\Spells\Undead\FreezingBreath\FreezingBreathMissile.mdl
      • -------- --------
      • -------- An effect occurs when the snowball damages a unit upon it's landing. --------
      • Set SF_SnowballUnitsFx = Abilities\Weapons\ZigguratFrostMissile\ZigguratFrostMissile.mdl
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- CODE DATA --------
      • -------- ( BE CAREFUL TOUCHING THE LINES BELOW IF YOU ARE UNEXPERIENCED IN TRIGGERING CODES ) --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- PRELOAD OBJECTS --------
      • -------- Abilities And Units: --------
      • Custom script: set udg_SF_Temp_Unit = CreateUnit( Player( 15 ), udg_SF_DummyType, 0, 0, 0 )
      • Custom script: call UnitAddAbility( udg_SF_Temp_Unit, udg_SF_Ability )
      • Custom script: call RemoveUnit( udg_SF_Temp_Unit )
      • -------- Effects: --------
      • Custom script: call Preload( udg_SF_FrostModel )
      • Custom script: call Preload( udg_SF_SpawnSnowballFx )
      • Custom script: call Preload( udg_SF_FrostPortalMissileModel )
      • Custom script: call Preload( udg_SF_FrostPortalMissileEndFx )
      • Custom script: call Preload( udg_SF_SnowballModel )
      • Custom script: call Preload( udg_SF_SnowballLandFx )
      • Custom script: call Preload( udg_SF_SnowballUnitsFx )
      • -------- --------
      • -------- Loop Event --------
      • Trigger - Add to Snowball Fountain Loop <gen> the event (Time - Every SF_PeriodicInterval seconds of game time)
      • -------- --------
      • -------- Initialize Calculations --------
      • For each (Integer SF_CustomInteger) from 1 to SF_AbilityMaxLevel, do (Actions)
        • Loop - Actions
          • Set SF_CustomReal[SF_CustomInteger] = (360.00 / (Real(SF_SnowballAmount[SF_CustomInteger])))
          • Set SF_CustomReal2[SF_CustomInteger] = (360.00 / (Real(SF_FrostPortalMissileAmount[SF_CustomInteger])))
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- END OF SPELL CONFIGURATION FIELD --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • Custom script: endfunction
      • Custom script:
      • Custom script: // Essential Functions:
      • Custom script: function SF_SafeFilter takes nothing returns boolean
      • Custom script: return true
      • -------- For calling/using GroupEnumUnitsInRange func. --------
  • Snowball Fountain Execution
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to SF_Ability
    • Actions
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- onCast --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Index --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SF_MaxIndex Equal to 0
        • Then - Actions
          • Trigger - Turn on Snowball Fountain Loop <gen>
        • Else - Actions
      • Set SF_MaxIndex = (SF_MaxIndex + 1)
      • -------- --------
      • -------- Data Allocations --------
      • Set SF_Caster[SF_MaxIndex] = (Triggering unit)
      • Set SF_Level[SF_MaxIndex] = (Level of SF_Ability for SF_Caster[SF_MaxIndex])
      • Set SF_Player[SF_MaxIndex] = (Triggering player)
      • Set SF_DurationCache[SF_MaxIndex] = 0.00
      • Set SF_SpawnSnowballIntervalCache[SF_MaxIndex] = 0.00
      • Set SF_FrostPMIntervalCache[SF_MaxIndex] = 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SF_SnowballRotate Equal to True
        • Then - Actions
          • Set SF_SnowballRotateAngle[SF_MaxIndex] = SF_SnowballFountainSpinSpeed[SF_Level[SF_MaxIndex]]
        • Else - Actions
      • -------- --------
      • -------- Fountain Creation --------
      • Custom script: set udg_SF_Frost[ udg_SF_MaxIndex ] = CreateUnit( udg_SF_Player[ udg_SF_MaxIndex ], udg_SF_DummyType, GetSpellTargetX( ), GetSpellTargetY( ), GetRandomReal( 0, 360 ) )
      • Custom script: set udg_SF_FrostModelCache[ udg_SF_MaxIndex ] = AddSpecialEffectTarget( udg_SF_FrostModel, udg_SF_Frost[ udg_SF_MaxIndex ], udg_SF_FrostModelAttach )
      • Custom script: call SetUnitScale( udg_SF_Frost[ udg_SF_MaxIndex ], udg_SF_FrostSize[ udg_SF_Level[ udg_SF_MaxIndex ] ], 0, 0 )
      • Custom script: call SetUnitFlyHeight( udg_SF_Frost[ udg_SF_MaxIndex ], udg_SF_FrostHeight[ udg_SF_Level[ udg_SF_MaxIndex ] ], 0 )
      • Custom script: set udg_SF_FrostX[ udg_SF_MaxIndex ] = GetWidgetX( udg_SF_Frost[ udg_SF_MaxIndex ] )
      • Custom script: set udg_SF_FrostY[ udg_SF_MaxIndex ] = GetWidgetY( udg_SF_Frost[ udg_SF_MaxIndex ] )
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
  • Snowball Fountain Loop
    • Events
    • Conditions
    • Actions
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- onLoop --------
      • -------- ---------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- declaration of locals --------
      • Custom script: local real spawnX
      • Custom script: local real spawnY
      • -------- --------
      • -------- Index Looping --------
      • For each (Integer SF_CurrentIndex) from 1 to SF_MaxIndex, do (Actions)
        • Loop - Actions
          • -------- ------------------------------------------------------------- --------
          • -------- --------
          • -------- Loads, Saves, Updates: DurationCounters --------
          • Set SF_DurationCache[SF_CurrentIndex] = (SF_DurationCache[SF_CurrentIndex] + SF_PeriodicInterval)
          • Set SF_FrostPMIntervalCache[SF_CurrentIndex] = (SF_FrostPMIntervalCache[SF_CurrentIndex] + SF_PeriodicInterval)
          • Set SF_SpawnSnowballIntervalCache[SF_CurrentIndex] = (SF_SpawnSnowballIntervalCache[SF_CurrentIndex] + SF_PeriodicInterval)
          • -------- --------
          • -------- Fountain Loop Damage --------
          • Custom script: call GroupEnumUnitsInRange( bj_lastCreatedGroup, udg_SF_FrostX[ udg_SF_CurrentIndex ], udg_SF_FrostY[ udg_SF_CurrentIndex ], udg_SF_FrostCollision[ udg_SF_Level[ udg_SF_CurrentIndex ] ], Condition( function SF_SafeFilter ) )
          • Custom script: loop
          • Custom script: set udg_SF_Temp_Unit = FirstOfGroup( bj_lastCreatedGroup )
          • Custom script: exitwhen udg_SF_Temp_Unit == null
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SF_Temp_Unit is dead) Not equal to True
              • (SF_Temp_Unit is Magic Immune) Not equal to True
              • (SF_Temp_Unit is A flying unit) Equal to False
              • (SF_Temp_Unit belongs to an enemy of SF_Player[SF_CurrentIndex]) Equal to True
              • Or - Any (Conditions) are true
                • Conditions
                  • (SF_Temp_Unit is A structure) Equal to False
                  • SF_DamageStructures Equal to True
              • Or - Any (Conditions) are true
                • Conditions
                  • (SF_Temp_Unit is Mechanical) Equal to False
                  • SF_DamageMechanical Equal to True
            • Then - Actions
              • Unit - Cause SF_Caster[SF_CurrentIndex] to damage SF_Temp_Unit, dealing SF_FrostDamage[SF_Level[SF_CurrentIndex]] damage of attack type SF_SnowballAttackType and damage type SF_SnowballDamageType
            • Else - Actions
          • Custom script: call GroupRemoveUnit( bj_lastCreatedGroup, udg_SF_Temp_Unit )
          • Custom script: endloop
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SF_SpawnSnowballIntervalCache[SF_CurrentIndex] Greater than or equal to SF_SpawnSnowballInterval[SF_Level[SF_CurrentIndex]]
            • Then - Actions
              • -------- ------------------------------------------------------------- --------
              • Custom script: call DestroyEffect( AddSpecialEffectTarget( udg_SF_SpawnSnowballFx, udg_SF_Frost[ udg_SF_CurrentIndex ], udg_SF_SpawnSnowballFxAttach ) )
              • -------- --------
              • -------- Snowballs Creation --------
              • For each (Integer SF_CustomInteger) from 1 to SF_SnowballAmount[SF_Level[SF_CurrentIndex]], do (Actions)
                • Loop - Actions
                  • -------- ------------------------------------------------------------- --------
                  • Set SF_SnowballCircularAngle = (SF_SnowballCircularAngle + SF_CustomReal[SF_Level[SF_CurrentIndex]])
                  • Custom script: set udg_SF_Snowball = CreateUnit( udg_SF_Player[ udg_SF_CurrentIndex ], udg_SF_DummyType, udg_SF_FrostX[ udg_SF_CurrentIndex ], udg_SF_FrostY[ udg_SF_CurrentIndex ], udg_SF_SnowballCircularAngle )
                  • Custom script: call SetUnitScale( udg_SF_Snowball, udg_SF_SnowballSize[ udg_SF_Level[ udg_SF_CurrentIndex ] ], 0, 0 )
                  • Custom script: call SetUnitFlyHeight( udg_SF_Snowball, udg_SF_FrostHeight[ udg_SF_Level[ udg_SF_CurrentIndex ] ], 0 )
                  • -------- ------------------------------------------------------------- --------
                  • -------- KB3D SYSTEM --------
                  • -------- ------------------------------------------------------------- --------
                  • Set KB3D_Unit = SF_Snowball
                  • Set KB3D_Range = SF_Radius[SF_Level[SF_CurrentIndex]]
                  • Set KB3D_Speed = SF_SnowballSpeed[SF_Level[SF_CurrentIndex]]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SF_SnowballRotate Equal to True
                    • Then - Actions
                      • Set SF_SnowballRotateAngle[SF_CurrentIndex] = (SF_SnowballRotateAngle[SF_CurrentIndex] + SF_SnowballFountainSpinSpeed[SF_Level[SF_CurrentIndex]])
                      • Set KB3D_Angle = (SF_SnowballCircularAngle + SF_SnowballRotateAngle[SF_CurrentIndex])
                    • Else - Actions
                      • Set KB3D_Angle = SF_SnowballCircularAngle
                  • Set KB3D_EndFx = SF_SnowballLandFx
                  • Set KB3D_AoEEndDamage = SF_SnowballLandDamage[SF_Level[SF_CurrentIndex]]
                  • Set KB3D_EndwhenDead = True
                  • Set KB3D_KillatEnd = True
                  • Set KB3D_Accel = SF_SnowballAcceleration[SF_Level[SF_CurrentIndex]]
                  • Set KB3D_AoE = SF_SnowballCollision[SF_Level[SF_CurrentIndex]]
                  • Set KB3D_AttackType = SF_SnowballAttackType
                  • Set KB3D_DamageType = SF_SnowballDamageType
                  • Set KB3D_Damager = SF_Caster[SF_CurrentIndex]
                  • Set KB3D_DestroyTree = SF_DestroyTrees
                  • Set KB3D_DisableUnit = True
                  • Set KB3D_FaceAngle = True
                  • Set KB3D_Fx_Attach = SF_SnowballModelAttach
                  • Set KB3D_AoEEndFx = SF_SnowballUnitsFx
                  • Set KB3D_iKB = False
                  • Set KB3D_JumpOverCliff = True
                  • Set KB3D_TrailFx = SF_SnowballModel
                  • Set KB3D_UnpathableStop = False
                  • Set KB3D_Zoffset = SF_SnowballMaxHeight[SF_Level[SF_CurrentIndex]]
                  • Set KB3D_D_STRUCTURE = SF_DamageStructures
                  • Set KB3D_D_MECHANICAL = SF_DamageMechanical
                  • -------- --------
                  • Custom script: call ExecuteFunc( "KB3D_Registration" )
                  • -------- ------------------------------------------------------------- --------
              • -------- --------
              • Set SF_SpawnSnowballIntervalCache[SF_CurrentIndex] = 0.00
              • -------- ------------------------------------------------------------- --------
            • Else - Actions
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SF_FrostPMIntervalCache[SF_CurrentIndex] Greater than or equal to SF_FrostPortalMissileInterval[SF_Level[SF_CurrentIndex]]
            • Then - Actions
              • -------- ------------------------------------------------------------- --------
              • -------- Fountain Missiles Creation --------
              • For each (Integer SF_CustomInteger) from 1 to SF_FrostPortalMissileAmount[SF_Level[SF_CurrentIndex]], do (Actions)
                • Loop - Actions
                  • -------- ------------------------------------------------------------- --------
                  • Set SF_FrostPortalMissileAngle = (SF_FrostPortalMissileAngle + SF_CustomReal2[SF_Level[SF_CurrentIndex]])
                  • Custom script: set spawnX = udg_SF_FrostX[ udg_SF_CurrentIndex ] + Cos( udg_SF_FrostPortalMissileAngle * bj_DEGTORAD )
                  • Custom script: set spawnY = udg_SF_FrostY[ udg_SF_CurrentIndex ] + Sin( udg_SF_FrostPortalMissileAngle * bj_DEGTORAD )
                  • Custom script: set udg_SF_FrostPortalMissile = CreateUnit( udg_SF_Player[ udg_SF_CurrentIndex ], udg_SF_DummyType, spawnX, spawnY, udg_SF_FrostPortalMissileAngle )
                  • Custom script: call SetUnitFlyHeight( udg_SF_FrostPortalMissile, udg_SF_FrostHeight[ udg_SF_Level[ udg_SF_CurrentIndex ] ], 0 )
                  • -------- ------------------------------------------------------------- --------
                  • -------- KB3D SYSTEM --------
                  • -------- ------------------------------------------------------------- --------
                  • Set KB3D_Unit = SF_FrostPortalMissile
                  • Set KB3D_Range = SF_Radius[SF_Level[SF_CurrentIndex]]
                  • Set KB3D_Speed = SF_FrostPortalMissileSpeed[SF_Level[SF_CurrentIndex]]
                  • Set KB3D_Angle = SF_FrostPortalMissileAngle
                  • Set KB3D_EndFx = SF_FrostPortalMissileEndFx
                  • Set KB3D_EndwhenDead = True
                  • Set KB3D_KillatEnd = True
                  • Set KB3D_Accel = SF_FrostPortalMissileAccel[SF_Level[SF_CurrentIndex]]
                  • Set KB3D_AoE = SF_FrostPortalMissileCollision[SF_Level[SF_CurrentIndex]]
                  • -------- ------------------------------------------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SF_FrostPortalMissileRotate Equal to True
                    • Then - Actions
                      • Set KB3D_Arc = (SF_FrostPortalMissileSpeed[SF_Level[SF_CurrentIndex]] / 25.00)
                    • Else - Actions
                      • Set KB3D_Arc = 0.00
                  • -------- ------------------------------------------------------------- --------
                  • Set KB3D_AttackType = SF_SnowballAttackType
                  • Set KB3D_DamageType = SF_SnowballDamageType
                  • Set KB3D_Damager = SF_Caster[SF_CurrentIndex]
                  • Set KB3D_DestroyTree = SF_DestroyTrees
                  • Set KB3D_DisableUnit = True
                  • Set KB3D_FaceAngle = False
                  • Set KB3D_Fx_Attach = SF_FrostPMMAttach
                  • Set KB3D_iKB = False
                  • Set KB3D_JumpOverCliff = True
                  • Set KB3D_TrailFx = SF_FrostPortalMissileModel
                  • Set KB3D_UnpathableStop = False
                  • Set KB3D_D_STRUCTURE = SF_DamageStructures
                  • Set KB3D_D_MECHANICAL = SF_DamageMechanical
                  • Set KB3D_LineDamage = SF_FrostPortalMissileDamage[SF_Level[SF_CurrentIndex]]
                  • -------- ------------------------------------------------------------- --------
                  • Custom script: call ExecuteFunc( "KB3D_Registration" )
                  • -------- ------------------------------------------------------------- --------
              • -------- --------
              • Set SF_FrostPMIntervalCache[SF_CurrentIndex] = 0.00
              • -------- ------------------------------------------------------------- --------
            • Else - Actions
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SF_DurationCache[SF_CurrentIndex] Greater than or equal to SF_Duration[SF_Level[SF_CurrentIndex]]
            • Then - Actions
              • -------- ------------------------------------------------------------- --------
              • -------- onEnd --------
              • -------- ------------------------------------------------------------- --------
              • Special Effect - Destroy SF_FrostModelCache[SF_CurrentIndex]
              • Unit - Kill SF_Frost[SF_CurrentIndex]
              • -------- --------
              • -------- Index Recycling --------
              • Set SF_Caster[SF_CurrentIndex] = SF_Caster[SF_MaxIndex]
              • Set SF_Level[SF_CurrentIndex] = SF_Level[SF_MaxIndex]
              • Set SF_Frost[SF_CurrentIndex] = SF_Frost[SF_MaxIndex]
              • Set SF_DurationCache[SF_CurrentIndex] = SF_DurationCache[SF_MaxIndex]
              • Set SF_FrostModelCache[SF_CurrentIndex] = SF_FrostModelCache[SF_MaxIndex]
              • Set SF_SpawnSnowballIntervalCache[SF_CurrentIndex] = SF_SpawnSnowballIntervalCache[SF_MaxIndex]
              • Set SF_Player[SF_CurrentIndex] = SF_Player[SF_MaxIndex]
              • Set SF_FrostPMIntervalCache[SF_CurrentIndex] = SF_FrostPMIntervalCache[SF_MaxIndex]
              • Set SF_FrostX[SF_CurrentIndex] = SF_FrostX[SF_MaxIndex]
              • Set SF_FrostY[SF_CurrentIndex] = SF_FrostY[SF_MaxIndex]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SF_SnowballRotate Equal to True
                • Then - Actions
                  • Set SF_SnowballRotateAngle[SF_CurrentIndex] = SF_SnowballRotateAngle[SF_MaxIndex]
                • Else - Actions
              • -------- --------
              • Set SF_MaxIndex = (SF_MaxIndex - 1)
              • Set SF_CurrentIndex = (SF_CurrentIndex - 1)
              • -------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SF_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
              • -------- ------------------------------------------------------------- --------
            • Else - Actions
          • -------- ------------------------------------------------------------- --------

Greetings Hivers!

" I've created a beautiful and funny spell using KB3D System ( Jad ) and specially using a... SNOWBALL MODEL! ~ ( Nara-shikamaru ) " - Give also credits to him/her.

" Fun to cast and watch the fountain of snowballs! "

" Useful for snow DESTRUCTION, ( as the damage includes structures and mechanicals ) and for WINTER BOSS ULTIMATE SPELL"

Just PM/Contact me if you have relevant issues in this spell.
Contents

Snowball Fountain v1.2a GUI (Map)

Reviews
KILLCIDE
Ahh yes, a much cleaner damage filter :D screw all those unneccesary If/Then/Else! The code looks good, extensive and descriptive configuration trigger, and awesome spell effects. The only downside I see with this spell is the amount of lag it...
Level 19
Joined
Aug 13, 2013
Messages
1,680
The fountain of death is perfectly modified, my spells are friendly in configuration so you can modify the spell base on your flavor or style. ~Have Fun!
Currently the version is v1.0a ( minor change about the fountain angle )
 
Level 36
Joined
Jul 22, 2015
Messages
3,491
Another awesome spell concept by jakeZinc. However, what is a spell submission by jakeZinc without addressing issues with his other submissions :D
  • Please keep map demo stuff in their own folder (TreeRevival)
  • TreeRevival was not letting me launch the map because of an "unexpected: elseif"
  • When you are preloading, why have users input the strings manually when you can just directly refer to their variables?
  • jakeZinc PLEEASE: set udg_SF_FrostModelCache[ udg_SF_MaxIndex ] = AddSpecialEffectTarget( udg_SF_FrostModel, udg_SF_Frost[ udg_SF_MaxIndex ], "origin" ). My heart dies inside when I see hardcoded things. This applies to all the other SpecialEffectTargets that have its attachment point hardcoded
  • The "recalculating issue" as with your 2 other submission applies to here for 360. / SF_FrostPortalMissleAmount[SF_Level]
  • Hmm why do multiply 1 to Cos and Sin? Also, I think they can be cached onCast as explained from your 2 other submissions
  • I see no need to null global variables (unless they are timers and unit groups), but as Cokemonkey explained to me before:
    It's perfectly reasonable to do so.
  • DummyRecycler? :D This will probably not make sense if you read this submission first. Just in case you do, I highly recommend it for spells / systems that have to recreate a lot of dummy units.
I do rather love the extensive configuration and nicely documented code. However, I am still confused as to why you mix a lot of Jass and GUI :p The use of FirstOfGroup() is fine, but it becomes really hard to read when you mix it with GUI If/Then/Else. They look like a wall of black text. This applies to your previous 2 submissions as well.

Awaiting Update for now.
 
Level 19
Joined
Aug 13, 2013
Messages
1,680
I'm glad that my current spells are finally getting a review. Thanks Killcide,

- About preloading, Ill change that. ( lol didnt notice that )
- About the tree revival, Ill just delete it instead since it gives the users some errors.
- About the model attachments, Ill add that in configuration. ( I thought origin is the only attaching point of dummy.mdx )
- About the recalculating issues, Ill try that.
- About the 1 multiplying to Cos/Sin, Ill remove that. ( I dont know either why I did that xD )
- About nulling global, I cant find anything wrong with it. ( but ill just remove it as you said. )
- About the if-nests inside the GroupEnum loop, Ill try to shorten it or change it to filter func. ( Those structure of condition configurations are wrong by the way ( my fault ), sorry for that wall of text xD )

-About the DummyRecycler, Currently I have no JNGP :( ( I use Vanilla Editor ) and is the reason why It is GUI.

Ill update these spells as soon as possible, after this snowball fountain gets approved Ill submit my developing spell ( a spell that gaves me the true meaning of busyness ).

EDIT: Updated to v1.1.

* Now preloads effect variables instead of manually writing it.
* Removed Tree Revival system. ( causing launching errors )
* Added a configuration of effects attachment.
* Added an init calculation on snowball angle, ( frost portal missile angle didn't work after calculating it onInit ( don't know why but It can be fixed by allocating this angle onCast and it forces me to create an array variable instead. )
* Removed the multipled itself of Cos/Sin.
* Removed nulled global variables at recycling.
 
Last edited:
Level 19
Joined
Aug 13, 2013
Messages
1,680
Updated to v1.2

* Added an ability max level configuration. ( for calculating purposes and etc. )
* Also preloads the ability and the dummy unit.
* Changed the array angles into non-array variable. ( allocating them is useless. )
* Initializes the calculation of both angle in initialization trigger. ( prevents recalculating issues. )
* Added a note that the amount of dummy units ( snowballs, missiles ) != 0 to prevent problems.
* Added a function that prevents leak in GroupEnumUnitsInRange func.
* Changed native unit coordinates into widget. ( faster )
* Reduced lags. ( it still depends on the modification of the user. )
 
Level 36
Joined
Jul 22, 2015
Messages
3,491
I only see two minor changes I would like to see changed and then it is ready for approval:
  • Can SF_Frost[] move around? If so, you can store the SpellTargetX and TargetY on cast instead of recalculating per loop iteration
  • The way you have your filters setup look a little freaky :p this is how I would do it:
    • Conditions
      • (SF_Temp_Unit is A flying unit) Equal to False
      • (SF_Temp_Unit is Magic Immune) Equal to False
      • (SF_Temp_Unit is alive) Equal to True
      • (SF_Temp_Unit belongs to an enemy of SF_Player[SF_CurrentIndex]) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (SF_Temp_Unit is A structure) Equal to False
          • SF_DamageStructures Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (SF_Temp_Unit is Mechanical) Equal to False
          • SF_DamageMechanical Equal to True
    • Actions
      • -------- damage unit --------
Set to Awaiting Update.
 
Level 19
Joined
Aug 13, 2013
Messages
1,680
I only see two minor changes I would like to see changed and then it is ready for approval:
  • Can SF_Frost[] move around? If so, you can store the SpellTargetX and TargetY on cast instead of recalculating per loop iteration
  • The way you have your filters setup look a little freaky :p this is how I would do it:
    • Conditions
      • (SF_Temp_Unit is A flying unit) Equal to False
      • (SF_Temp_Unit is Magic Immune) Equal to False
      • (SF_Temp_Unit is alive) Equal to True
      • (SF_Temp_Unit belongs to an enemy of SF_Player[SF_CurrentIndex]) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (SF_Temp_Unit is A structure) Equal to False
          • SF_DamageStructures Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (SF_Temp_Unit is Mechanical) Equal to False
          • SF_DamageMechanical Equal to True
    • Actions
      • -------- damage unit --------
Set to Awaiting Update.

^ Updated to v1.2a
* Frost Portal unit's coordinates stored onCast instead onLoop. ( Prevents recalculating in loop iterations )
* Fixed the if nests filtering onLoop.

Finally maybe the last update ^^.
 
Level 36
Joined
Jul 22, 2015
Messages
3,491
Ahh yes, a much cleaner damage filter :D screw all those unneccesary If/Then/Else!

The code looks good, extensive and descriptive configuration trigger, and awesome spell effects. The only downside I see with this spell is the amount of lag it generates. The overall spell concept is also all right. I didn't take the time to look at all the variables you use in JASS, but look out for the possibility of any global variables that are only used in custom scripts. When users import this into their map, the global might not be transfered over, causing errors.

Approved with a 4/5 rating.
 
Top