• 🏆 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!

Fire Circle v1.06b

  • Like
Reactions: Grievous1
First of all:
-Sorry for the unoriginal name of the spell, but because it fit the spell effect I used it.
-Sorry for my bad english.

So, what is that ?
It's a spell which I made when I had nothing to do, I made it because circulars spells are my favourite.

How does it works ?
The caster creates three bolts of fire, which will rotate and create a circle which will expand, damaging all units the bolts encounter when they rotate, and destroying trees (I love spells which destroy trees). When the bolts reach the max distance, they disappears.

Anything else ?
The spell is fully MUI and uses hashtable
Credits:
Vladadamm: Helped me to fix my code
Tirlititi: Helped me a lot with the damage and MUI.

Triggers are here:
  • Fire Circle Settings
    • Evénements
      • Map initialization
    • Conditions
    • Actions
      • -------- Creation of the hashtable --------
      • Table de hachage - Create a hashtable
      • Set FC_Hashtable = (Last created hashtable)
      • -------- We set if the spell uses specials effetcs, if set to false, the spell will use it but the fps may drop (warning do not leave a blank for SFX models, because there is always few effects that won't affect the game/map performances) --------
      • Set FC_BetterFPS = FALSE
      • -------- Setting the dummies ID --------
      • Set FC_DummyType = Dummy (Fire Circle)
      • -------- We set the max distance the orbs can reach before they disappear --------
      • Set FC_MaxDistanceBase = 600.00
      • Set FC_MaxDistanceLevel = 200.00
      • -------- Setting how fast the circle expends and how fast the orbs rotate. --------
      • Set FC_Speed_Base = 2.50
      • Set FC_Speed_Level = 2.50
      • -------- Setting how often the effects will be created in the loop --------
      • Set FC_Effect_Timer = 0.09
      • -------- Setting the units that can be damaged by the spell --------
      • Set FC_Damage_Air = TRUE
      • Set FC_Damage_Ground = TRUE
      • Set FC_Damage_Heroes = TRUE
      • Set FC_Damage_Immune = FALSE
      • Set FC_Damage_Mechanical = TRUE
      • Set FC_Damage_Building = FALSE
      • -------- Setting the damages of the spell --------
      • Set FC_Base_Damage = 50.00
      • Set FC_Level_Damage = 50.00
      • -------- Setting the "attack" type of the spell --------
      • Set FC_Attack_Type = Magie
      • -------- Setting the damage type of the spell --------
      • Set FC_Damage_Type = Feu
      • -------- Setting if the spell can do critical damage --------
      • Set FC_Critical = TRUE
      • -------- Setting the critical multiplier --------
      • Set FC_CriticalMultiplier = 2.00
      • -------- Setting the chances of critical --------
      • Set FC_CriticalChanceBase = 1.00
      • Set FC_CriticalChanceLvl = 2.00
      • -------- Setting the SFX model (disabled if FC_BetterFPS is set to TRUE) --------
      • Set FC_SFX = Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
      • -------- Setting how close of the dummies the units must be to be damaged(you have to change the dummies ability range of effect too) --------
      • Set FC_RangeofDamageBase = 150.00
      • Set FC_RangeofDamageLevel = 0.00
      • -------- Setting the SFX on damaged units (disabled if FC_BetterFPS is set to TRUE) --------
      • Set FC_SFX_Damage_Unit = Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
      • -------- Setting if trees can be destroyed by the spell --------
      • Set FC_DestroyTrees = TRUE
      • -------- Setting the "TreeRemover" ID (disabled if FC_Destroy_Trees is set to FALSE) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • FC_DestroyTrees Egal à TRUE
        • Alors - Actions
          • Set FC_TreeRemoverType = TreeRemover (Fire Circle)
          • Set FC_TmpPoint = (Center of (Playable map area))
          • Unité - Create 1 FC_TreeRemoverType for Neutre Passif at FC_TmpPoint facing Orientation bâtiment par défaut degrees
          • Set FC_TreeRemover = (Last created unit)
          • Unité - Hide FC_TreeRemover
          • Custom script: call UnitAddAbility( udg_FC_TreeRemover, 'Aloc')
          • Custom script: call RemoveLocation(udg_FC_TmpPoint)
        • Sinon - Actions
      • -------- Setting the "HandleDummy" ID (it's the dummy who makes the spell MUI, just import the one there is in this map) --------
      • Set FC_HandleDummyType = Dummy (Fire Circle) (Handle)
      • -------- Setting the range of how close the trees must be to be destroyed (do not touch if you set FC_DestroyTrees to FALSE) --------
      • Set FC_RangeofDamageTreesBase = 180.00
      • Set FC_RangeofDamageTreesLevel = 60.00
      • -------- Setting the SFX when trees are destroyed (disabled if FC_BetterFPS is set to TRUE) --------
      • Set FC_SFX_Damage_Trees = Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
      • -------- Setting the ability of the spell( just import the ability like the dummies and the TreeRemover) --------
      • Set FC_Ability = Fire Circle
      • -------- Setting the ability of the dummies( just import the ability like the dummies and the TreeRemover) --------
      • Set FC_DummyAbility = Fire Circle Damage
      • -------- Setting the buff used by the dummies' ability --------
      • Set FC_Buff = Fire_Circle_Damage_Buff
  • Fire Circle Start
    • Evénements
      • Unité - A unit Initie l'effet d'une compétence
    • Conditions
      • (Ability being cast) Egal à FC_Ability
    • Actions
      • Set FC_TmpCaster = (Casting unit)
      • Set FC_TmpPoint = (Position of FC_TmpCaster)
      • Unité - Create 1 FC_HandleDummyType for (Owner of FC_TmpCaster) at FC_TmpPoint facing Orientation bâtiment par défaut degrees
      • Set FC_TmpHandle = (Last created unit)
      • Groupe unité - Add (Last created unit) to FC_Group
      • -------- Setting the variable of the instance --------
      • Table de hachage - Save (Level of FC_Ability for FC_TmpCaster) as (Key Abilitylevel) of (Key FC_TmpHandle) in FC_Hashtable
      • Table de hachage - Save Handle OfFC_TmpCaster as (Key Caster) of (Key FC_TmpHandle) in FC_Hashtable
      • Set FC_Angle_Real = ((Facing of FC_TmpCaster) - 120.00)
      • Set FC_TmpPoint = (Position of FC_TmpCaster)
      • -------- Creating the first dummy --------
      • For each (Integer FC_i) from 1 to 3, do (Actions)
        • Boucle - Actions
          • Set FC_Angle_Real = (FC_Angle_Real + 120.00)
          • Set FC_TmpPoint2 = (FC_TmpPoint offset by 90.00 towards FC_Angle_Real degrees)
          • Table de hachage - Save FC_Angle_Real as FC_i of (Key FC_TmpHandle) in FC_Hashtable
          • Unité - Create 1 FC_DummyType for (Owner of FC_TmpCaster) at FC_TmpPoint2 facing Orientation bâtiment par défaut degrees
          • Set FC_TmpDummy = (Last created unit)
          • Unité - Set level of FC_DummyAbility for FC_TmpDummy to (Load (Key Abilitylevel) of (Key FC_TmpHandle) from FC_Hashtable)
          • Table de hachage - Save Handle OfFC_TmpDummy as (FC_i + 3) of (Key FC_TmpHandle) in FC_Hashtable
          • Custom script: set udg_FC_TmpDummy = null
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si - Conditions
              • FC_BetterFPS Egal à FALSE
            • Alors - Actions
              • Effet spécial - Create a special effect at FC_TmpPoint2 using FC_SFX
              • Effet spécial - Destroy (Last created special effect)
            • Sinon - Actions
          • Custom script: call RemoveLocation(udg_FC_TmpPoint2)
      • Custom script: call RemoveLocation(udg_FC_TmpPoint)
      • -------- Setting the range of the instance to 0.00 --------
      • Set FC_Distance = 0.00
      • Table de hachage - Save FC_Distance as (Key Distance) of (Key FC_TmpHandle) in FC_Hashtable
      • Set FC_MaxDistance = (FC_MaxDistanceBase + ((Real((Level of FC_Ability for FC_TmpCaster))) x FC_MaxDistanceLevel))
      • Table de hachage - Save FC_MaxDistance as (Key MaxDistance) of (Key FC_TmpHandle) in FC_Hashtable
      • -------- Setting the timer of the instance --------
      • Set FC_Effect_Timer_Instance = FC_Effect_Timer
      • Table de hachage - Save FC_Effect_Timer_Instance as (Key Effecttimer) of (Key FC_TmpHandle) in FC_Hashtable
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • (Number of units in FC_Group) Egal à 1
        • Alors - Actions
          • Déclencheur - Turn on Fire Circle Loop <gen>
          • Déclencheur - Turn on Fire Circle Damage <gen>
        • Sinon - Actions
      • Custom script: set udg_FC_TmpHandle = null
      • Custom script: set udg_FC_TmpCaster = null
  • Fire Circle Loop
    • Evénements
      • Temps - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Groupe unité - Pick every unit in FC_Group and do (Actions)
        • Boucle - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si - Conditions
              • ((Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable) is alive) Egal à TRUE
            • Alors - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si - Conditions
                  • (Load (Key Distance) of (Key (Picked unit)) from FC_Hashtable) Inférieur à (Load (Key MaxDistance) of (Key (Picked unit)) from FC_Hashtable)
                • Alors - Actions
                  • -------- Setting the center of the circle so to the caster's position --------
                  • Set FC_TmpPoint = (Position of (Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable))
                  • -------- Increasing the distance so the circle is growing --------
                  • Set FC_Distance = ((Load (Key Distance) of (Key (Picked unit)) from FC_Hashtable) + (FC_Speed_Base + (FC_Speed_Level x (Real((Load (Key Abilitylevel) of (Key (Picked unit)) from FC_Hashtable))))))
                  • Table de hachage - Save FC_Distance as (Key Distance) of (Key (Picked unit)) in FC_Hashtable
                  • -------- Increasing the angle and moving the dummies --------
                  • For each (Integer FC_i) from 1 to 3, do (Actions)
                    • Boucle - Actions
                      • Set FC_Angle_Real = ((Load FC_i of (Key (Picked unit)) from FC_Hashtable) + (FC_Speed_Base + (FC_Speed_Level x (Real((Load (Key Abilitylevel) of (Key (Picked unit)) from FC_Hashtable))))))
                      • Table de hachage - Save FC_Angle_Real as FC_i of (Key (Picked unit)) in FC_Hashtable
                      • Set FC_TmpPoint2 = (FC_TmpPoint offset by (Load (Key Distance) of (Key (Picked unit)) from FC_Hashtable) towards (Load FC_i of (Key (Picked unit)) from FC_Hashtable) degrees)
                      • Unité - Make (Load (FC_i + 3) of (Key (Picked unit)) in FC_Hashtable) face (Load FC_i of (Key (Picked unit)) from FC_Hashtable) over 0.00 seconds
                      • Set FC_X = (X of FC_TmpPoint2)
                      • Set FC_Y = (Y of FC_TmpPoint2)
                      • Custom script: call SetUnitX( LoadUnitHandle( udg_FC_Hashtable, GetHandleId( GetEnumUnit() ),(udg_FC_i + 3) ), udg_FC_X )
                      • Custom script: call SetUnitY( LoadUnitHandle( udg_FC_Hashtable, GetHandleId( GetEnumUnit() ),(udg_FC_i + 3) ), udg_FC_Y )
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • Si - Conditions
                          • FC_BetterFPS Egal à FALSE
                        • Alors - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si - Conditions
                              • (Load (Key Effecttimer) of (Key (Picked unit)) from FC_Hashtable) Supérieur à 0.00
                            • Alors - Actions
                              • Set FC_Effect_Timer_Instance = ((Load (Key Effecttimer) of (Key (Picked unit)) from FC_Hashtable) - 0.03)
                              • Table de hachage - Save FC_Effect_Timer_Instance as (Key Effecttimer) of (Key (Picked unit)) in FC_Hashtable
                            • Sinon - Actions
                              • Set FC_Effect_Timer_Instance = FC_Effect_Timer
                              • Table de hachage - Save FC_Effect_Timer_Instance as (Key Effecttimer) of (Key (Picked unit)) in FC_Hashtable
                              • Effet spécial - Create a special effect at FC_TmpPoint2 using FC_SFX
                              • Effet spécial - Destroy (Last created special effect)
                        • Sinon - Actions
                      • Custom script: call RemoveLocation(udg_FC_TmpPoint2)
                  • -------- Clearing the leaks of points --------
                  • Custom script: call RemoveLocation(udg_FC_TmpPoint)
                • Sinon - Actions
                  • -------- Removing all dummies --------
                  • For each (Integer FC_i2) from 1 to 3, do (Actions)
                    • Boucle - Actions
                      • Set FC_TmpPoint2 = (Position of (Load (FC_i + 3) of (Key (Picked unit)) in FC_Hashtable))
                      • Unité - Remove (Load (FC_i2 + 3) of (Key (Picked unit)) in FC_Hashtable) from the game
                      • Custom script: call RemoveLocation(udg_FC_TmpPoint2)
                  • Table de hachage - Clear all child hashtables of child (Key (Picked unit)) in FC_Hashtable
                  • Set FC_TmpHandleDummy = (Picked unit)
                  • Groupe unité - Remove FC_TmpHandleDummy from FC_Group
                  • Unité - Remove FC_TmpHandleDummy from the game
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Si - Conditions
                      • (Number of units in FC_Group) Egal à 0
                    • Alors - Actions
                      • Déclencheur - Turn off (This trigger)
                      • Déclencheur - Turn off Fire Circle Damage <gen>
                    • Sinon - Actions
                  • Custom script: set udg_FC_TmpHandleDummy = null
            • Sinon - Actions
              • -------- Removing all dummies --------
              • For each (Integer FC_i2) from 1 to 3, do (Actions)
                • Boucle - Actions
                  • Unité - Remove (Load (FC_i2 + 3) of (Key (Picked unit)) in FC_Hashtable) from the game
              • Table de hachage - Clear all child hashtables of child (Key (Picked unit)) in FC_Hashtable
              • Set FC_TmpHandleDummy = (Picked unit)
              • Groupe unité - Remove FC_TmpHandleDummy from FC_Group
              • Unité - Remove FC_TmpHandleDummy from the game
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si - Conditions
                  • (Number of units in FC_Group) Egal à 0
                • Alors - Actions
                  • Déclencheur - Turn off (This trigger)
                  • Déclencheur - Turn off Fire Circle Damage <gen>
                • Sinon - Actions
              • Custom script: set udg_FC_TmpHandleDummy = null
  • Fire Circle Damage
    • Evénements
      • Temps - Every 0.33 seconds of game time
    • Conditions
    • Actions
      • Groupe unité - Pick every unit in FC_Group and do (Actions)
        • Boucle - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si - Conditions
              • ((Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable) is alive) Egal à TRUE
            • Alors - Actions
              • Set FC_TmpHandle = (Picked unit)
              • For each (Integer FC_i3) from 1 to 3, do (Actions)
                • Boucle - Actions
                  • Set FC_TmpPoint2 = (Position of (Load (FC_i3 + 3) of (Key (Picked unit)) in FC_Hashtable))
                  • -------- Checking if the spell can deal critical damage and rolling if the damages will be critical or not --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Si - Conditions
                      • FC_Critical Egal à TRUE
                    • Alors - Actions
                      • Set FC_TmpInt = ((Integer(FC_CriticalChanceBase)) + ((Load (Key Abilitylevel) of (Key (Picked unit)) from FC_Hashtable) x (Integer(FC_CriticalChanceLvl))))
                      • Set FC_TmpInt2 = (Random integer number between 1 and 100)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • Si - Conditions
                          • FC_TmpInt2 Inférieur ou égal à FC_TmpInt
                        • Alors - Actions
                          • Set FC_Damage = (FC_Damage x FC_CriticalMultiplier)
                        • Sinon - Actions
                          • Set FC_Damage = (FC_Base_Damage + (FC_Level_Damage x (Real((Level of FC_Ability for (Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable))))))
                    • Sinon - Actions
                      • Set FC_Damage = (FC_Base_Damage + (FC_Level_Damage x (Real((Level of FC_Ability for (Load (Key Caster) of (Key (Picked unit)) in FC_Hashtable))))))
                  • Table de hachage - Save FC_Damage as (Key Damage) of FC_TmpInt in FC_Hashtable
                  • -------- Checking if the spell can destroy trees and if it can then destroy the trees --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • Si - Conditions
                      • FC_DestroyTrees Egal à TRUE
                    • Alors - Actions
                      • Destructible - Pick every destructible within (FC_RangeofDamageTreesBase + (FC_RangeofDamageTreesLevel x (Real((Load (Key Abilitylevel) of (Key (Picked unit)) from FC_Hashtable))))) of FC_TmpPoint2 and do (Actions)
                        • Boucle - Actions
                          • Set FC_Destructable = (Picked destructible)
                          • Unité - Order FC_TreeRemover to Récolter FC_Destructable
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si - Conditions
                              • (Current order of FC_TreeRemover) Egal à (Order(harvest))
                              • (FC_Destructable is alive) Egal à TRUE
                            • Alors - Actions
                              • Set FC_TmpPoint = (Position of FC_Destructable)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • Si - Conditions
                                  • FC_BetterFPS Egal à FALSE
                                • Alors - Actions
                                  • Effet spécial - Create a special effect at FC_TmpPoint2 using FC_SFX
                                  • Effet spécial - Destroy (Last created special effect)
                                • Sinon - Actions
                              • Destructible - Kill FC_Destructable
                              • Custom script: call RemoveLocation(udg_FC_TmpPoint)
                            • Sinon - Actions
                          • Unité - Order FC_TreeRemover to Arrêter
                    • Sinon - Actions
                  • -------- Damaging all units --------
                  • Custom script: set bj_wantDestroyGroup = true
                  • Groupe unité - Pick every unit in (Units within (FC_RangeofDamageBase + (FC_RangeofDamageLevel x (Real((Load (Key Abilitylevel) of FC_TmpInt from FC_Hashtable))))) of FC_TmpPoint2 matching (((Matching unit) has buff FC_Buff) Egal à TRUE)) and do (Actions)
                    • Boucle - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • Si - Conditions
                          • Or - Any (Conditions) are true
                            • Conditions
                              • ((Picked unit) is Un bâtiment) Egal à FC_Damage_Building
                              • ((Picked unit) is Une unité volante) Egal à FC_Damage_Air
                              • ((Picked unit) is Un héros) Egal à FC_Damage_Heroes
                              • ((Picked unit) is Mécanique) Egal à FC_Damage_Mechanical
                              • ((Picked unit) is Insensible à la magie) Egal à FC_Damage_Immune
                              • ((Picked unit) is Une unité terrestre) Egal à FC_Damage_Ground
                        • Alors - Actions
                          • Set FC_TmpPoint = (Position of (Picked unit))
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • Si - Conditions
                              • FC_BetterFPS Egal à FALSE
                            • Alors - Actions
                              • Effet spécial - Create a special effect at FC_TmpPoint2 using FC_SFX
                              • Effet spécial - Destroy (Last created special effect)
                            • Sinon - Actions
                          • Unité - Cause (Load (Key Caster) of (Key FC_TmpHandle) in FC_Hashtable) to damage (Picked unit), dealing (Load (Key Damage) of (Key (Picked unit)) from FC_Hashtable) damage of attack type FC_Attack_Type and damage type FC_Damage_Type
                          • Custom script: call RemoveLocation(udg_FC_TmpPoint)
                        • Sinon - Actions
                  • -------- Clearing the leaks of the points --------
                  • Custom script: call RemoveLocation(udg_FC_TmpPoint2)
              • -------- clearing the leak of the handle --------
              • Custom script: set udg_FC_TmpHandle = null
            • Sinon - Actions
-v1.01: uploaded the spell.
-v1.02: recoded the spell as Almia suggested.
-v1.03: reworked the spell because it got somes problems with indexing.
-v1.04: simplified the code with loops.
-v1.05: added somes comments and added the damage type as parameters, removed the BJs in SetUnitX and SetUnitY, changed the damage trigger period to 0.33 instead of 1.00, so it's more accurate.
-v1.06: the spell now create the sfx each time a customizable timer reach 0 so fps drop is reduced (I recommend using a 0.09/0.12 timer because it's what that make the spell "cute" (for somes reasons somes values like 0.06 or 0.15 create a bug with the effects)
-v1.06b: just changed a little thing with the removing of the dummies



Keywords:
Lord, Demon , X , Lord_Demon_X , Circle , Fire ,GUI , MUI , Unicorn
Contents

Fire Circle v1.06b (Map)

Reviews
Fire Circle v1.06b | Reviewed by Maker | 3rd Aug 2013 APPROVED You did a good job fixing the performance issue, now there is no fps drop The effects are good Add some follow through time so the caster does the...

Moderator

M

Moderator


Fire Circle v1.06b | Reviewed by Maker | 3rd Aug 2013
APPROVED


126248-albums6177-picture66521.png


  • You did a good job fixing the performance issue, now there
    is no fps drop
  • The effects are good
126248-albums6177-picture66523.png


  • Add some follow through time so the caster does
    the cast animation properly
  • You could store the handle id of picked unit into a variable
    and use the variable
[tr]



Fire Circle v1.03 | Reviewed by Maker | 21st Jul 2013
NEEDS FIX


126248-albums6177-picture66522.png


  • Fire Circle Damage should be initially off and turned off when the
    trigger is not needed
  • Store the ability level when you cast the spell, and load it in
    the looping trigger
126248-albums6177-picture66523.png


  • Your comments should be in English
  • Remove upgrades used from the dummies
  • You could use looping in Fire Circle Start to shorten the code
  • You could reduce the FPS drop and effect spam by choosing
    and effect that leaves a trail and creating the effects less often
  • You could reduce the fps drop by using SetUnitX and SetUnitY
    instead of Move unit instantly
[tr]


Fire Circle v1.02 | Reviewed by Maker | 18th Feb 2013
Needs Fix

Required changes
  • There is a location leak when you create the tree cutter dummy
  • You are spamming too many effects causing FPS drop
Suggested changes
  • You could reduce the amount of lines in Fire Circle Start if you looped the angle.
    First the angle is facing - x and then increase by x during every loop
  • You can simplify your damage condition with this method:
    • ((Picked unit) is A structure) Equal to FC_Damage_Building
Useful Links
[td]
[/TD]
 
Review:
1)Casting Unit -> Triggering Unit
2)Set FC_Caster = Triggering Unit
3)Set FC_Face = Facing Angle of FC_Caster
4)Set FC_Level = Level of FC_Ability for (Casting unit)
5)120.00 add to the configuration
6)Fix your way of indexing
7)Inside the For Loop Integer,please put this:
  • -------- We create the 1st dummy and save his handle and the value of the angle --------
    • Set TmpPoint2 = (TmpPoint offset by 90.00 towards FC_Angle1 degrees)
    • Unité - Create 1 Dummy (Fire Circle) for (Owner of (Casting unit)) at TmpPoint2 facing Orientation bâtiment par défaut degrees
    • Table de hachage - Save FC_Angle1 as 1 of FC_Count in FC_Hashtable
    • Table de hachage - Save FC_Angle2 as 3 of FC_Count in FC_Hashtable
    • Table de hachage - Save FC_Angle3 as 5 of FC_Count in FC_Hashtable
    • Table de hachage - Save Handle Of(Last created unit) as 2 of FC_Count in FC_Hashtable
    • Unité - Set level of FC_Dummies_Ability for (Last created unit) to (Level of FC_Ability for (Casting unit))
    • Effet spécial - Create a special effect at TmpPoint2 using FC_SFX
    • Effet spécial - Destroy (Last created special effect)
    • Custom script: call RemoveLocation(udg_TmpPoint2)
    • -------- We create the 2nd dummy and save his handle --------
    • Set TmpPoint2 = (TmpPoint offset by 90.00 towards FC_Angle2 degrees)
    • Unité - Create 1 Dummy (Fire Circle) for (Owner of (Casting unit)) at TmpPoint2 facing Orientation bâtiment par défaut degrees
    • Unité - Set level of FC_Dummies_Ability for (Last created unit) to (Level of FC_Ability for (Casting unit))
    • Table de hachage - Save Handle Of(Last created unit) as 4 of FC_Count in FC_Hashtable
    • Effet spécial - Create a special effect at TmpPoint2 using FC_SFX
    • Effet spécial - Destroy (Last created special effect)
    • Custom script: call RemoveLocation(udg_TmpPoint2)
    • -------- We create the 3rd dummy and save his handle --------
    • Set TmpPoint2 = (TmpPoint offset by 90.00 towards FC_Angle3 degrees)
    • Unité - Create 1 Dummy (Fire Circle) for (Owner of (Casting unit)) at TmpPoint2 facing Orientation bâtiment par défaut degrees
    • Unité - Set level of FC_Dummies_Ability for (Last created unit) to (Level of FC_Ability for (Casting unit))
    • Table de hachage - Save Handle Of(Last created unit) as 6 of FC_Count in FC_Hashtable
    • Effet spécial - Create a special effect at TmpPoint2 using FC_SFX
    • Effet spécial - Destroy (Last created special effect)
8)TempPoint2 should be PC_TempPoint2
9)You dont need a hashtable for this.Hashtable + indexing for a spell is ugly.
You can get the right unit like this:
  • set Index = 0
  • For Each (Integer A) from 1 to MaxIndex , do (Actions)
    • Loop - Actions
      • If Unit[Integer A] is Equal To Unit[CurrentIndex] then
        • Set Index = Integer A
      • endif

This is all of the things i can give now because you have a different language
 
Level 4
Joined
Nov 13, 2012
Messages
28
I know, indexing + hashtable is ugly but this is the only way I found, because creating dummies used for the handle use more space for each time the spell is casted.

1)Casting Unit -> Triggering Unit
Done.

2)Set FC_Caster = Triggering Unit
It will makes me use an unnecessary variable, and saving the caster is useless if I use hashtable.

3)Set FC_Face = Facing Angle of FC_Caster
Same as 2) , unnecessaries variables, I don't remember that Facing Angle leaks

4)Set FC_Level = Level of FC_Ability for (Casting unit)
Using this variable has the only effect of preventing ability-levelup when the spell is used
and makes the code more readable. Added

5)120.00 add to the configuration
If changed, the circle won't be a circle, it has just for effect to change the graphical effect of the spell. Added

6)Fix your way of indexing
I suppose, you're saying that I must remove the use of hashtable and use indexing method ? I can do this but it will takes a while for rewrite the spell.

7)Inside the For Loop Integer,please put this:
Moving the dummies creation inside of the loop, why ? I don' truely understand.

8)TempPoint2 should be FC_TempPoint2
And I suppose that TmpPoint => FC_TempPoint ? This won't change anything. Done

9)You dont need a hashtable for this.Hashtable + indexing for a spell is ugly.
You can get the right unit like this:
You're saying that I must rewrite the spell with indexing isn't it ?
 
Cache variables adds speed in interpretation.
Computer interprets every functions that are used.That's why you need to cache it.
No.5 must be inside a real variable,put it in the configuration.
Then use it like
set angle = angle - theangle

8)this prevents variable name collision
9)yes
7)You are repeating the actions all over again,which are unacceptable way of coding
 
Level 4
Joined
Nov 13, 2012
Messages
28
For the 7) can you give me a example how I should index the dummies in the loop please ?

Because I made something but it don't look terrific.

  • Fire Circle Start
    • Events
      • Unit - A unit Initie l'effet d'une compétence
    • Conditions
      • (Ability being cast) Equal to* FC_Ability
    • Actions
      • Custom script: local integer i = 1
      • Set FC_Count = (FC_Count + 1)
      • Set FC_Count3 = FC_Count
      • Set FC_Caster[FC_Count] = (Casting unit)
      • Set FC_Level[FC_Count] = (Level of FC_Ability for FC_Caster[FC_Count])
      • -------- We save the handle of the caster in the hashtable and set the angle of the dummies --------
      • Table de hachage - Save Handle Of(Casting unit) as 0 of FC_Count in FC_Hashtable
      • Set FC_Angle1[FC_Count] = (Facing of FC_Caster[FC_Count])
      • Set FC_Angle2[FC_Count] = ((Facing of FC_Caster[FC_Count]) + FC_Angle_Between_Bolts)
      • Set FC_Angle3[FC_Count] = ((Facing of FC_Caster[FC_Count]) - FC_Angle_Between_Bolts)
      • Set FC_TmpPoint = (Position of (Triggering unit))
      • -------- We create the 1st dummy and save his handle and the value of the angle --------
      • Custom script: loop
      • Custom script: exitwhen i > 3
      • Custom script: if i == 1 then
      • Set FC_TmpPoint2 = (FC_TmpPoint offset by 90.00 towards FC_Angle1[FC_Count] degrees)
      • Unit - Create 1 Dummy (Fire Circle) for (Owner of FC_Caster[FC_Count]) at FC_TmpPoint2 facing Orientation default building facing degrees
      • Set FC_Dummy1[FC_Count] = (Last created unit)
      • Unit - Set level of FC_Dummies_Ability for FC_Dummy1[FC_Count] to FC_Level[FC_Count]
      • Custom script: elseif i == 2 then
      • Set FC_TmpPoint2 = (FC_TmpPoint offset by 90.00 towards FC_Angle2[FC_Count] degrees)
      • Unit - Create 1 Dummy (Fire Circle) for (Owner of FC_Caster[FC_Count]) at FC_TmpPoint2 facing Orientation default building facing degrees
      • Set FC_Dummy2[FC_Count] = (Last created unit)
      • Unit - Set level of FC_Dummies_Ability for FC_Dummy2[FC_Count] to FC_Level[FC_Count]
      • Custom script: elseif i == 3 then
      • Set FC_TmpPoint2 = (FC_TmpPoint offset by 90.00 towards FC_Angle3[FC_Count] degrees)
      • Unit - Create 1 Dummy (Fire Circle) for (Owner of FC_Caster[FC_Count]) at FC_TmpPoint2 facing Orientation default building facing degrees
      • Set FC_Dummy3[FC_Count] = (Last created unit)
      • Unit - Set level of FC_Dummies_Ability for FC_Dummy3[FC_Count] to FC_Level[FC_Count]
      • Custom script: endif
      • Special Effect - Create a special effect at FC_TmpPoint2 using FC_SFX
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_FC_TmpPoint2)
      • Custom script: set i = i + 1
      • Custom script: endloop
Done all others things you suggested.
 
Last edited:
Level 16
Joined
Jul 31, 2012
Messages
2,217
The Damage trigger is very bad, it uses 1 s loop which is very high for a dynamic spell
and like other users said, it spams particles
It needs fix, contact Maker or magtheridon to at least moderate the current version (1.4)
You like circle spells which destroys trees ha,, check this
oh and btw:
Oh, un français MDR, j'en suis pas un moi :p
2/5, NEEDS FIX
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
As said this needs to be in english

change this to use the variable u set above it.

  • Set FC_TmpHandle = (Last created unit)
  • Groupe unité - Add (Last created unit) to FC_Group
anything u use twice or more store into a variable and use the variable. ex store this in an integer variable (Key FC_TmpHandle)
This is for speed and efficiency

use the variable u set above this.
  • Set FC_TmpHandleDummy = (Picked unit)
  • Groupe unité - Remove (Picked unit) from FC_Group
store picked unit b4 this and use it in place of picked unit.
  • ((Picked unit) is Un bâtiment) Egal Ã* FC_Damage_Building
  • ((Picked unit) is Une unité volante) Egal Ã* FC_Damage_Air
  • ((Picked unit) is Un héros) Egal Ã* FC_Damage_Heroes
  • ((Picked unit) is Mécanique) Egal Ã* FC_Damage_Mechanical
  • ((Picked unit) is Insensible Ã* la magie) Egal Ã* FC_Damage_Immune
  • ((Picked unit) is Une unité terrestre) Egal Ã* FC_Damage_Ground
 
Level 4
Joined
Nov 13, 2012
Messages
28
As said this needs to be in english

Eveything is in english (in fact, everything except comments is between french and english but that's because I'm french so I don't often install games in english.)

change this to use the variable u set above it.

  • Set FC_TmpHandle = (Last created unit)
  • Groupe unité - Add (Last created unit) to FC_Group
I can't do it because that's not "allowed" by the editor to store a handle in the unit group (I can load the handle of an unit from an hashtable but not add the handle into a group)

anything u use twice or more store into a variable and use the variable. ex store this in an integer variable (Key FC_TmpHandle)
This is for speed and efficiency

I'm not really sure that storing the handle variable in another variable will really increase the speed.

use the variable u set above this.
  • Set FC_TmpHandleDummy = (Picked unit)
  • Groupe unité - Remove (Picked unit) from FC_Group
Done, nothing to say.

store picked unit b4 this and use it in place of picked unit.
  • ((Picked unit) is Un bâtiment) Egal Ã* FC_Damage_Building
  • ((Picked unit) is Une unité volante) Egal Ã* FC_Damage_Air
  • ((Picked unit) is Un héros) Egal Ã* FC_Damage_Heroes
  • ((Picked unit) is Mécanique) Egal Ã* FC_Damage_Mechanical
  • ((Picked unit) is Insensible Ã* la magie) Egal Ã* FC_Damage_Immune
  • ((Picked unit) is Une unité terrestre) Egal Ã* FC_Damage_Ground
You want me to store a group that is instantly destroyed with the bj_wantDestroyGroup into a group variable that I'll have to nullify just 5-6 lines after ? I don't really see the point.

So, it would be great to explain me why the changes mentionned above are necessary and how could/should I do with those which aren't "allowed" by the editor.
 
Top