• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

[Trigger] Arcane Eruption Modification

Status
Not open for further replies.
Level 5
Joined
Nov 6, 2014
Messages
70
I just tried to copy the triggers and variables from Arcane Eruption (made by someone else) to use it in a campaign, also I created the dummy missile and
also the skill infos in object editor. Now, whenever I test it, it doesn't work like the ones from the original.

  • AE SetUp
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set udg_AE_Hash = InitHashtable()
      • -------- Configuration --------
      • -------- Determines the damage --------
      • Set AE_Damage[1] = 50.00
      • Set AE_Damage[2] = 75.00
      • Set AE_Damage[3] = 100.00
      • -------- Determines the mana burn --------
      • Set AE_ManaBurn[1] = 50.00
      • Set AE_ManaBurn[2] = 75.00
      • Set AE_ManaBurn[3] = 100.00
      • -------- Determines the duration --------
      • Set AE_Duration[1] = 5.00
      • Set AE_Duration[2] = 10.00
      • Set AE_Duration[3] = 15.00
      • -------- Determines the radius of AoE --------
      • Set AE_Radius[1] = 500.00
      • Set AE_Radius[2] = 750.00
      • Set AE_Radius[3] = 1000.00
      • -------- Determines the height of the orbs --------
      • -------- By Arc --------
      • Set AE_Height[1] = 0.50
      • Set AE_Height[2] = 0.75
      • Set AE_Height[3] = 1.00
      • -------- Determines the touch radius of the orb --------
      • Set AE_DamageRadius = 75.00
      • -------- Determines the number of orbs --------
      • -------- By Hex --------
      • Set AE_OrbsNumberMin[1] = 1
      • Set AE_OrbsNumberMax[1] = 3
      • Set AE_OrbsNumberMin[2] = 2
      • Set AE_OrbsNumberMax[2] = 4
      • Set AE_OrbsNumberMin[3] = 3
      • Set AE_OrbsNumberMax[3] = 5
      • -------- Determines the orb interval --------
      • Set AE_OrbInterval = 0.20
      • -------- Determines the SFX when orbs drop --------
      • Set AE_SFX[1] = Units\NightElf\Wisp\WispExplode.mdl
  • AE Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Impetigo Arcanim
    • Actions
      • -------- Variables --------
      • Set AE_Caster = (Triggering unit)
      • Custom script: set udg_AE_CasterKey = GetHandleId(udg_AE_Caster)
      • -------- Starting Loop --------
      • Set AE_CurrentDuration = 0.00
      • Set AE_Level = (Level of Impetigo Arcanim for AE_Caster)
      • Hashtable - Save AE_CurrentDuration as 0 of AE_CasterKey in AE_Hash
      • Hashtable - Save AE_Level as 1 of AE_CasterKey in AE_Hash
      • Unit Group - Add AE_Caster to AE_LoopGroup
  • AE Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in AE_LoopGroup and do (Actions)
        • Loop - Actions
          • Set AE_U = (Picked unit)
          • Custom script: set udg_AE_UKey = GetHandleId(udg_AE_U)
          • -------- Load --------
          • Set AE_CurrentDuration = (Load 0 of AE_UKey from AE_Hash)
          • Set AE_Level = (Load 1 of AE_UKey from AE_Hash)
          • Set AE_Timer = (Load 2 of AE_UKey from AE_Hash)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AE_CurrentDuration Less than AE_Duration[AE_Level]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AE_Timer Greater than AE_OrbInterval
                • Then - Actions
                  • -------- Creating Orbs --------
                  • Set AE_ULoc = (Position of AE_U)
                  • Set AE_Owner = (Owner of AE_U)
                  • -------- Determines the hex number of orbs --------
                  • Set AE_OrbHex = (Random integer number between AE_OrbsNumberMin[AE_Level] and AE_OrbsNumberMax[AE_Level])
                  • For each (Integer AE_Integer) from 1 to AE_OrbHex, do (Actions)
                    • Loop - Actions
                      • Unit - Create 1 AE Missile for AE_Owner at AE_Loc facing (Random angle) degrees
                      • Set AE_Orb = (Last created unit)
                      • Custom script: set udg_AE_OrbKey = GetHandleId(udg_AE_Orb)
                      • -------- Variables for the orbs --------
                      • Set AE_Distance = (Random real number between 0.00 and AE_Radius[AE_Level])
                      • Set AE_Arc = (AE_Distance x AE_Height[AE_Level])
                      • Set AE_CurrentHeight = 0.00
                      • Set AE_Travelled = 0.00
                      • -------- Due to that we will save first the travelled before we use the change height,i added a value so that it will use the height first --------
                      • -------- Saving Variables --------
                      • Hashtable - Save AE_Distance as 0 of AE_OrbKey in AE_Hash
                      • Hashtable - Save AE_Arc as 1 of AE_OrbKey in AE_Hash
                      • Hashtable - Save AE_Travelled as 2 of AE_OrbKey in AE_Hash
                      • Hashtable - Save AE_Level as 3 of AE_OrbKey in AE_Hash
                      • Hashtable - Save Handle OfAE_Owner as 4 of AE_OrbKey in AE_Hash
                      • Hashtable - Save AE_CurrentHeight as 5 of AE_TempKey in AE_Hash
                      • -------- Starting Loop --------
                      • Unit Group - Add AE_Orb to AE_OrbsGroup
                  • -------- Clean Leak --------
                  • Custom script: call RemoveLocation(udg_AE_ULoc)
                  • Hashtable - Save 0.00 as 2 of AE_UKey in AE_Hash
                • Else - Actions
                  • Hashtable - Save (AE_Timer + 0.03) as 2 of AE_UKey in AE_Hash
              • -------- Saving Variables --------
              • Hashtable - Save (AE_CurrentDuration + 0.03) as 0 of AE_UKey in AE_Hash
            • Else - Actions
              • Hashtable - Clear all child hashtables of child AE_UKey in AE_Hash
              • Unit Group - Remove AE_U from AE_LoopGroup
      • Unit Group - Pick every unit in AE_OrbsGroup and do (Actions)
        • Loop - Actions
          • Set AE_Orbs = (Picked unit)
          • Custom script: set udg_AE_TempKey = GetHandleId(udg_AE_Orbs)
          • -------- Load --------
          • Set AE_Distance = (Load 0 of AE_TempKey from AE_Hash)
          • Set AE_Arc = (Load 1 of AE_TempKey from AE_Hash)
          • Set AE_Travelled = (Load 2 of AE_TempKey from AE_Hash)
          • Set AE_Level = (Load 3 of AE_TempKey from AE_Hash)
          • Set AE_Owner = (Load 4 of AE_TempKey in AE_Hash)
          • Set AE_CurrentHeight = (Load 5 of AE_TempKey from AE_Hash)
          • -------- Checking --------
          • Set AE_Loc = (Position of AE_Orbs)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AE_Travelled Less than AE_Distance
            • Then - Actions
              • Set AE_Offset = (AE_Loc offset by (AE_Distance x 0.03) towards (Facing of AE_Orbs) degrees)
              • -------- Moving Unit --------
              • Unit - Move AE_Orbs instantly to AE_Offset
              • -------- Changing Height --------
              • Hashtable - Save (AE_Travelled + (AE_Distance x 0.03)) as 2 of AE_TempKey in AE_Hash
              • Hashtable - Save (((4.00 x AE_Arc) / AE_Distance) x (((Load 2 of AE_TempKey from AE_Hash) / AE_Distance) x (AE_Distance - (Load 2 of AE_TempKey from AE_Hash)))) as 5 of AE_TempKey in AE_Hash
              • Animation - Change AE_Orbs flying height to (Load 5 of AE_TempKey from AE_Hash) at 0.00
              • -------- Saving --------
              • Custom script: call RemoveLocation(udg_AE_Offset)
            • Else - Actions
              • -------- Damaging Units --------
              • Unit - Kill AE_Orbs
              • Set AE_DamageGroup = (Units within AE_DamageRadius of AE_Loc)
              • Unit Group - Pick every unit in AE_DamageGroup and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • ((Picked unit) is A structure) Not equal to True
                          • ((Picked unit) is Magic Immune) Not equal to True
                          • ((Picked unit) is alive) Equal to True
                          • ((Picked unit) belongs to an enemy of AE_Owner) Equal to True
                    • Then - Actions
                      • -------- Damaging --------
                      • Unit - Cause AE_Orbs to damage (Picked unit), dealing AE_Damage[AE_Level] damage of attack type Spells and damage type Normal
                      • -------- Burning Mana --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Mana of (Picked unit)) Greater than 0.00
                        • Then - Actions
                          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - AE_ManaBurn[AE_Level])
                        • Else - Actions
                    • Else - Actions
              • -------- SFX --------
              • Special Effect - Create a special effect at AE_Loc using AE_SFX[1]
              • Special Effect - Destroy (Last created special effect)
              • -------- Clean UP --------
              • Custom script: call DestroyGroup(udg_AE_DamageGroup)
              • Hashtable - Clear all child hashtables of child AE_TempKey in AE_Hash
              • Unit Group - Remove AE_Orbs from AE_OrbsGroup
          • Custom script: call RemoveLocation(udg_AE_Loc)
NOTE: Impetigo Arcanim is just the renamed version of Arcane Eruption.
Any fix?
(seems like hard to import custom spells from here to another map.)
 
Level 3
Joined
Jul 27, 2012
Messages
33
i think better u import all first in original map, such object(ability, unit, trigger, model), then u export all of them to your map, import model firstly, object, and trigger lastly, to make sure the ability work, use import manager in object editor, trigger, and model
 
Status
Not open for further replies.
Top