• 🏆 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 Enchanment 1.5

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: Nightmare Moon
Hi this is my first spell I made MUI (hope so^^) and I would like to hear what u think about the spell and what I have to change.

The Fire Mage summons 5 power missiles. The rotating missiles rotate in a bigger radius every second and if they hit a unit the hitting missile explodes, in 200 radius they deal 50/75/100 damage to enemy units and stuns them for 0.75/0.95/1.15 seconds.

  • Fire Enchantment Start
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) equal to Fire Enchantment
      • ((Triggering unit) has buff Fire Enchantment ) equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • FE_freeIndexes_count equal to 0
        • 'THEN'-Actions
          • Set FE_TempIndex = FE_Index_count
          • Set FE_Index_count = (FE_Index_count + 1)
        • 'ELSE'-Actions
          • Set FE_freeIndexes_count = (FE_freeIndexes_count - 1)
          • Set FE_TempIndex = FE_freeIndexes[FE_freeIndexes_count]
      • Set FE_active[FE_active_count] = FE_TempIndex
      • Set FE_active_count = (FE_active_count + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • FE_active_count equal to 1
        • 'THEN'-Actions
          • Trigger - Turn on Fire Enchantment Periodic <gen>
        • 'ELSE'-Actions
      • Set FE_data_angle[FE_TempIndex] = (Facing of (Triggering unit))
      • Set FE_data_caster[FE_TempIndex] = (Triggering unit)
      • Set FE_data_location_caster[FE_TempIndex] = (Position of FE_data_caster[FE_TempIndex])
      • Set FE_data_distance[FE_TempIndex] = 25.00
      • Set FE_data_speed[FE_TempIndex] = 90.00
      • For each (Integer A) from 0 to 4, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Missile | Fire Protes for (Triggering player) at (FE_data_location_caster[FE_TempIndex] offset by FE_data_distance[((FE_TempIndex x 5) + (Integer A))] towards (FE_data_angle[FE_TempIndex] + ((Real((Integer A))) x 72.00)) degrees) facing ((FE_data_angle[FE_TempIndex] + 90.00) + ((Real((Integer A))) x 72.00)) degrees
          • Set FE_data_missile[((FE_TempIndex x 5) + (Integer A))] = (Last created unit)




  • Fire Enchantment Periodic
    • Events
      • Time - Every (1.00 / 32.00) seconds of game time
    • Conditions
    • Actions
      • Set FE_TempCount = FE_active_count
      • For each (Integer A) from 1 to FE_TempCount, do (Actions)
        • Loop - Actions
          • Set FE_TempIndex = FE_active[(FE_TempCount - (Integer A))]
          • Set FE_data_distance[FE_TempIndex] = (Min((FE_data_distance[FE_TempIndex] + (25.00 / 32.00)), 250.00))
          • Set FE_data_speed[FE_TempIndex] = (Min((FE_data_angle[FE_TempIndex] + (90.00 / 36.00)), 180.00))
          • Set FE_data_angle[FE_TempIndex] = (FE_data_angle[FE_TempIndex] + (FE_data_speed[FE_TempIndex] / 32.00))
          • Set AlleTot = True
          • For each (Integer B) from 0 to 4, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Conditions
                  • (FE_data_caster[FE_TempIndex] has buff Fire Enchantment ) equal to False
                • 'THEN'-Actions
                  • Unit - Kill FE_data_missile[((FE_TempIndex x 5) + (Integer B))]
                • 'ELSE'-Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • 'IF'-Conditions
                      • (FE_data_missile[((FE_TempIndex x 5) + (Integer B))] is alive) equal to True
                    • 'THEN'-Actions
                      • Set AlleTot = False
                      • Set FE_data_location_caster[FE_TempIndex] = (Position of FE_data_caster[FE_TempIndex])
                      • Unit - Move FE_data_missile[((FE_TempIndex x 5) + (Integer B))] instantly to (FE_data_location_caster[FE_TempIndex] offset by FE_data_distance[FE_TempIndex] towards (FE_data_angle[FE_TempIndex] + ((Real((Integer B))) x 72.00)) degrees)
                      • Unit - Make FE_data_missile[((FE_TempIndex x 5) + (Integer B))] face ((FE_data_angle[FE_TempIndex] + 90.00) + ((Real((Integer B))) x 72.00)) over 0.00 seconds
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in (Units within 100.00 of (Position of FE_data_missile[((FE_TempIndex x 5) + (Integer B))]) matching ((((Matching unit) belongs to an enemy of (Owner of FE_data_caster[FE_TempIndex])) equal to True) and (((Matching unit) is alive) equal to True))) and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • 'IF'-Conditions
                              • ((Picked unit) is Magic Immune) equal to False
                              • (FE_data_missile[((FE_TempIndex x 5) + (Integer B))] is alive) equal to True
                              • ((Picked unit) is Mechanic) equal to False
                              • ((Picked unit) is A Building) equal to False
                            • 'THEN'-Actions
                              • Unit - Create 1 Dummy for (Triggering player) at (Position of FE_data_missile[((FE_TempIndex x 5) + (Integer B))]) facing 0.00 degrees
                              • Unit - Add Dummy | Fire Protes to (Last created unit)
                              • Unit - Set level of Dummy | Fire Protes for (Last created unit) to (Level of Fire Enchantment for FE_data_caster[FE_TempIndex])
                              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                              • Unit - Order (Last created unit) to Neutral - 'Firebolt' (Picked unit)
                              • Unit - Kill FE_data_missile[((FE_TempIndex x 5) + (Integer B))]
                              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
                              • Special Effect - Destroy (Last created special effect)
                            • 'ELSE'-Actions
                    • 'ELSE'-Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • AlleTot equal to True
            • 'THEN'-Actions
              • Unit - Remove Fire Enchantment buff from FE_data_caster[FE_TempIndex]
              • Set FE_freeIndexes[FE_freeIndexes_count] = FE_TempIndex
              • Set FE_freeIndexes_count = (FE_freeIndexes_count + 1)
              • Set FE_active_count = (FE_active_count - 1)
              • Set FE_active[(FE_TempCount - (Integer A))] = FE_active[FE_active_count]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Conditions
                  • FE_active_count equal to 0
                • 'THEN'-Actions
                  • Custom script: call RemoveLocation(udg_FE_data_location_caster[udg_FE_TempIndex])
                  • Trigger - Turn off (This trigger)
                • 'ELSE'-Actions
            • 'ELSE'-Actions


1.1 The Damage will now increase with the level of the spell.
1.2 The damage is reduced from 75/100/225 per missile to 50/75/100 per missile.
1.3 Removed some location leaks and 1 Unit Group leak.
1.4 Removed (Owner of (Triggering unit)) and replaced with (Triggering player) twice and removed Animation - Play (Triggering unit)'s spell animation.
1.5 Changed model of the missiles.


Keywords:
Fire, Enchant, Flame, Mage, Missile
Contents

Fire Enchantment (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. Bribe: Unit - Create 1 Missile | Fire Protes for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) - Leaks a location. Also, use (Triggering player) instead of...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.

Bribe:

Unit - Create 1 Missile | Fire Protes for (Owner of (Triggering unit)) at ((Position of (Triggering unit))

- Leaks a location. Also, use (Triggering player) instead of (Owner of (Triggering unit)) as it saves a step.

You leak 2 locations here:

Unit - Move FE_data_missile[((FE_TempIndex x 5) + (Integer B))] instantly to ((Position of FE_data_caster[FE_TempIndex]) offset by FE_data_distance[FE_TempIndex] towards (FE_data_angle[FE_TempIndex] + ((Real((Integer B))) x 72.00)) degrees)

You need bj_wantDestroyGroup = true before this line:

Unit Group - Pick every unit in (Units within 100.00 of (Position of FE_data_missile[((FE_TempIndex x 5) + (Integer B))]) matching ((((Matching unit) belongs to an enemy of (Owner of FE_data_caster[FE_TempIndex])) Equal to true) and (((Matching unit) is alive) Equal to true))) and do (Actions)

Unit - Create 1 Dummy for (Owner of FE_data_caster[FE_TempIndex]) at (Position of FE_data_missile[((FE_TempIndex x 5) + (Integer B))]) facing 0.00 degrees

- Leaks a location.

Maker, v1.5, 14.07.2011
You have lots of leaks. Point with polar offset uses two points. You must clear them both.
 
Level 12
Joined
Apr 16, 2010
Messages
584
review

-your indexing system is kinda big;
-do not use integer A and B use custom variables as they are faster;
-why in a world would you use event like every (1/32)? just use 0.03;
-you really need to add documentation!;
-instead of For each (Integer B) from 0 to 4, do (Actions) use For each (Integer B) from 1 to 4, do (Actions);
-Unit - Create 1 Missile | Fire Protes for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by FE_data_distance[((FE_TempIndex x 5) + (Integer A))] towards (FE_data_angle[FE_TempIndex] + ((Real((Integer A))) x 72.00)) degrees) facing ((FE_data_angle[FE_TempIndex] + 90.00) + ((Real((Integer A))) x 72.00)) degrees - leaks a location;
-why you use this Set FE_TempCount = FE_active_count? it could be done without it;
- Unit - Move FE_data_missile[((FE_TempIndex x 5) + (Integer B))] instantly to ((Position of FE_data_caster[FE_TempIndex]) offset by FE_data_distance[FE_TempIndex] towards (FE_data_angle[FE_TempIndex] + ((Real((Integer B))) x 72.00)) degrees) leaks a location;
-Unitgroup - Pick every unit in (Units within 100.00 of (Position of FE_data_missile[((FE_TempIndex x 5) + (Integer B))]) matching ((((Matching unit) belongs to an enemy of (Owner of FE_data_caster[FE_TempIndex])) equal to True) and (((Matching unit) is alive) equal to True))) and do (Actions) unit group leaks as a point in too;
-in same group you should also check if picked unit isn't a structure and belong to an enemy of caster;
-Unit - Create 1 Dummy for (Owner of FE_data_caster[FE_TempIndex]) at (Position of FE_data_missile[((FE_TempIndex x 5) + (Integer B))]) facing 0.00 degrees leaks a location.
Think that is all... Improve it
 
Level 3
Joined
May 7, 2011
Messages
13
Ok guys now I need help... when I want to make the missiles location into a variable I can´t remove the location with a custom script because of the:
  • Example - (Position of FE_data_missile[((FE_TempIndex x 5) + (Integer B))])
I dont now the part:
  • x 5) + (Integer B))])
Thx for help:goblin_good_job:
 
Top