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

Energy Field 1.02

Leaves a mark on the ground, which activates after 0.75s. A field of arcane energy emanates from the mark, devastating nearby opponents.

Basically a flamestrike- like ability which deals massive damage when the enemy doesn't pay attention. Also stuns enemies, making them more vulnerable to the next energy/ies.

[HIDDEN="TRIGGERS]
  • Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- How large the AOE is --------
      • Set EF_AOE = 520.00
      • -------- The maximum distance from the target point the energies emanate --------
      • Set EF_MaxDistance = (EF_AOE / 2.00)
      • -------- The minimum distance from the target point the energies emanate --------
      • Set EF_MinDistance = (EF_AOE / 4.00)
      • -------- The release effect --------
      • Set EF_ReleaseEffect = Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • -------- The ability --------
      • Set EF_Ability = Energy Field
      • -------- How long after cast does the ability take effect --------
      • Set EF_CastDelay = 0.75
      • -------- How large the damage AOE per energy damages enemies. --------
      • Set EF_DamageArea = 250.00
      • -------- How much damage per level --------
      • -------- Note that a unit can be damage multiple times --------
      • Set EF_Damage[1] = 30.00
      • Set EF_Damage[2] = 40.00
      • Set EF_Damage[3] = 50.00
      • Set EF_Damage[4] = 60.00
      • -------- How long the spell lasts per level --------
      • Set EF_Duration[1] = 3.35
      • Set EF_Duration[2] = 4.10
      • Set EF_Duration[3] = 4.85
      • Set EF_Duration[4] = 5.60
      • -------- The effect of the Energies --------
      • Set EF_EffectModel = Objects\Spawnmodels\NightElf\NEDeathSmall\NEDeathSmall.mdl
      • -------- The size of the effect (%) --------
      • Set EF_Size = 85.00
      • -------- The color of the effect (RGB, the fourth one being transparency[%]) --------
      • Set EF_Color[1] = 100.00
      • Set EF_Color[2] = 100.00
      • Set EF_Color[3] = 100.00
      • Set EF_Color[4] = 0.00
      • -------- Attack and damage types --------
      • Set EF_AttackType = Spells
      • Set EF_DamageType = Force
  • Energy Field
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to EF_Ability
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EF_Integer Equal to 0
        • Then - Actions
          • Trigger - Turn on Energy Field Loop <gen>
        • Else - Actions
      • Set EF_Integer = (EF_Integer + 1)
      • Set EF_Caster[EF_Integer] = (Triggering unit)
      • Set EF_Level[EF_Integer] = (Level of EF_Ability for EF_Caster[EF_Integer])
      • Set EF_Player[EF_Integer] = (Owner of EF_Caster[EF_Integer])
      • Set EF_TargetPoint[EF_Integer] = (Target point of ability being cast)
      • Set EF_Time[EF_Integer] = EF_CastDelay
      • Set EF_Energies[EF_Integer] = ((EF_Duration[EF_Level[EF_Integer]] - EF_CastDelay) / 0.15)
  • Energy Field Loop
    • Events
      • Time - Every 0.15 seconds of game time
    • Conditions
    • Actions
      • For each (Integer TempIndex) from 1 to EF_Integer, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EF_Time[TempIndex] Greater than 0.00
            • Then - Actions
              • Set EF_Time[TempIndex] = (EF_Time[TempIndex] - 0.15)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EF_Energies[TempIndex] Greater than 0.00
                • Then - Actions
                  • -------- Do not tinker with this if you don't know what you're doing --------
                  • Set EF_Energies[TempIndex] = (EF_Energies[TempIndex] - 1.00)
                  • Set TempReal = (Random real number between EF_MinDistance and EF_MaxDistance)
                  • -------- Region --------
                  • Set TempPoint = (EF_TargetPoint[TempIndex] offset by (Random real number between EF_MinDistance and EF_MaxDistance) towards (Random angle) degrees)
                  • -------- The energy --------
                  • Unit - Create 1 Dummy for EF_Player[TempIndex] at TempPoint facing Default building facing degrees
                  • Set TempUnit = (Last created unit)
                  • Special Effect - Create a special effect attached to the chest of TempUnit using EF_EffectModel
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect attached to the chest of TempUnit using EF_ReleaseEffect
                  • Special Effect - Destroy (Last created special effect)
                  • Animation - Change TempUnit's size to (EF_Size%, 0.00%, 0.00%) of its original size
                  • Animation - Change TempUnit's vertex coloring to (EF_Color[1]%, EF_Color[2]%, EF_Color[3]%) with EF_Color[4]% transparency
                  • Unit - Add Energy Field (Dummy) to TempUnit
                  • -------- Damage Group --------
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within EF_DamageArea of TempPoint) and do (Actions)
                    • Loop - Actions
                      • Custom script: set udg_TempTarget = GetEnumUnit()
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (TempTarget is alive) Equal to True
                          • (TempTarget is Magic Immune) Equal to False
                          • (TempTarget belongs to an enemy of EF_Player[TempIndex]) Equal to True
                        • Then - Actions
                          • Unit - Order TempUnit to Neutral - Hurl Boulder TempTarget
                          • Unit - Cause EF_Caster[TempIndex] to damage TempTarget, dealing EF_Damage[EF_Level[TempIndex]] damage of attack type EF_AttackType and damage type EF_DamageType
                        • Else - Actions
                      • Custom script: set udg_TempTarget = null
                  • Custom script: set udg_TempUnit = null
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
                  • -------- Nulling and recycling of variables --------
                  • Set EF_Caster[TempIndex] = EF_Caster[EF_Integer]
                  • Custom script: set udg_EF_Caster[udg_EF_Integer] = null
                  • Set EF_Level[TempIndex] = EF_Level[EF_Integer]
                  • Custom script: call RemoveLocation(udg_EF_TargetPoint[udg_TempIndex])
                  • Set EF_TargetPoint[TempIndex] = EF_TargetPoint[EF_Index]
                  • Set EF_Level[TempIndex] = EF_Level[EF_Integer]
                  • Set EF_Time[TempIndex] = EF_Time[EF_Integer]
                  • Set EF_Integer = (EF_Integer - 1)
                  • Set TempIndex = (TempIndex - 1)
                  • -------- Turn off Trigger --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EF_Integer Less than or equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
[/HIDDEN]

Update: Fixed the issue stated below.

Credits to Vexorian for the dummy. I didn't give credit on multiple occasions, I thought it was fine. ><

Update: After some billion years, decided to fix it[the de-indexing] since I saw someone in the WEHZ ask help for something similar.

Update: I discovered a problem after further tests in which the energies did not show up at all. Fixed.

Keywords:
Energy, Field, Energy Field, ThunderClap, NEDeath
Contents

Energy Field (Map)

Reviews
Energy Field 1.02 | Reviewed by Maker | 21st Aug 2013 APPROVED Leakless and MUI spell [tr] Use a variable for the dummy and dummy ability You could improve the learn tooltip and pay attention to the learned icon...

Moderator

M

Moderator


Energy Field 1.02 | Reviewed by Maker | 21st Aug 2013
APPROVED


126248-albums6177-picture66521.png


  • Leakless and MUI spell
126248-albums6177-picture66523.png


  • Use a variable for the dummy and dummy ability
  • You could improve the learn tooltip and pay attention to the
    learned icon position in command card
  • Rather than storing the level of the ability, store the damage value
[tr]
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
this will leak and bug up.
  • Set EF_TargetPoint[TempIndex] = EF_TargetPoint[EF_Integer]
  • Set EF_TargetPoint[EF_Integer] = TempPoint
  • Custom script: call RemoveLocation(udg_TempPoint)
  • Custom script: call RemoveLocation(udg_EF_TargetPoint[udg_EF_Integer])
u should remove the location of the location that u is at tempIndex. then u set target point tempindex = target point maxIndex.
then set the one at maxIndex to null.

@ mckill2009
the indexing he uses is fine to use. it is dynamic indexing
check out my tutorial for gui he uses the same indexing in that one.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
could also be the location bug i said. also he should check if the maxIndex is 0 only in the de-index portion. this will stop it from unnecessarily running.

not sure y u do this after u reduce the index.
  • Set TempReal = EF_Time[TempIndex]
  • Set EF_Time[TempIndex] = EF_Time[EF_Integer]
  • Set EF_Time[EF_Integer] = TempReal
also u should reduce the looping integer after u reduce the maxIndex integer.
if u dont ur spell looping will skip an index whenever something gets de-indexed.
 
could also be the location bug i said. also he should check if the maxIndex is 0 only in the de-index portion. this will stop it from unnecessarily running.

not sure y u do this after u reduce the index.
  • Set TempReal = EF_Time[TempIndex]
  • Set EF_Time[TempIndex] = EF_Time[EF_Integer]
  • Set EF_Time[EF_Integer] = TempReal
also u should reduce the looping integer after u reduce the maxIndex integer.
if u dont ur spell looping will skip an index whenever something gets de-indexed.

He was using an index recycler,though what he was doing is recyling it infinitely
JASS:
set index[1] = index[2]
set index[2] = index[1]
 
For the unit size,please make all those 100 to 0.
I suggest you using Dummy.mdx to make the effect of the unit model configurable(dummy.mdx outdoes it)
Ask Maker to how to optimize the unit's data.

What? Didn't I use dummy.mdx? Ok I'll set it to 0.

u should remove the location of the location that u is at tempIndex. then u set target point tempindex = target point maxIndex.
then set the one at maxIndex to null.

Thanks for that, my logic seems messed up.

Gonna update after a little testing.
 
lolwut?
  • Unit - Create 1 Dummy for EF_Player[TempIndex] at TempPoint facing Default building facing degrees
    • Set TempUnit = (Last created unit)
    • Special Effect - Create a special effect attached to the chest of TempUnit using EF_EffectModel
    • Special Effect - Destroy (Last created special effect)
    • Special Effect - Create a special effect attached to the chest of TempUnit using EF_ReleaseEffect
    • Special Effect - Destroy (Last created special effect)
    • Animation - Change TempUnit's size to (EF_Size%, 0.00%, 0.00%) of its original size
    • Animation - Change TempUnit's vertex coloring to (EF_Color[1]%, EF_Color[2]%, EF_Color[3]%) with EF_Color[4]% transparency
    • Unit - Add Energy Field (Dummy) to TempUnit
Untitled.jpg
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
this might be the problem. this isnt coded right.
  • Set EF_Caster[EF_Integer] = EF_Caster[TempIndex]
  • Set EF_Caster[TempIndex] = TempCaster
it should be this
  • Set EF_Caster[TempIndex] = Set EF_Caster[EF_Integer]
also u set this twice in ur de-index part.
  • Set EF_Level[TempIndex] = EF_Level[EF_Integer]
  • Set EF_Level[EF_Integer] = TempInteger
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
The deindexing should look like this
  • -------- Nulling and recycling of variables --------
  • Set EF_Caster[TempIndex] = EF_Caster[EF_Integer]
  • Set EF_Level[TempIndex] = EF_Level[EF_Integer]
  • Custom script: call RemoveLocation(udg_EF_TargetPoint[udg_TempIndex])
  • Set EF_TargetPoint[TempIndex] = EF_TargetPoint[EF_Integer]
  • Set EF_Time[TempIndex] = EF_Time[EF_Integer]
  • Set TempIndex = (TempIndex - 1)
  • Set EF_Integer = (EF_Integer - 1)

This is not needed
  • EF_Energies[TempIndex] Less than or equal to 0.00

Resource set to Needs Fix
 
Top