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

Klingo Arcane Storm v1.04

~Arcane Storm~
The Monster call his arcane power to create arcane's ray every 0.25 seconds for 5 seconds on random enemy around the monster to deal them damage.
Level 1: 20 damage , 300 Aoe.
Level 2: 25 damage , 350 Aoe.
Level 3: 30 damage , 400 Aoe.
  • ASHashtable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Creating the hashtable --------
      • Hashtable - Create a hashtable
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Store it into a variable --------
      • Set ASHashtable = (Last created hashtable)
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
  • ASInit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Storm
    • Actions
      • -------- Turn on the periodic trigger , realy important to make the spell work --------
      • Trigger - Turn on ASPeriodic <gen>
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Put the caster into a variable , note: Triggering unit is more efficient than Casting unit --------
      • Set ASCaster = (Triggering unit)
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Store Caster's position into a variable --------
      • Set ASCasterPoint = (Position of ASCaster)
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Set who own the caster --------
      • Set ASPlayer = (Owner of ASCaster)
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Set the aoe of the spell , note: you can change the value to what you want --------
      • Set ASAOE = (250.00 + (50.00 x (Real((Level of Arcane Storm for ASCaster)))))
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Set the damage of the spell, Note: you can change this value to what you want --------
      • Set ASDamage = (15.00 + (5.00 x (Real((Level of Arcane Storm for ASCaster)))))
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • -------- This is the time of the spell. Note you can change the value to what you want. --------
      • Set ASTime = 5.00
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • -------- This add the caster to a group it's important so don't touch it --------
      • Unit Group - Add ASCaster to ASCasterGroup
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Here I save values that I have stored before --------
      • -------- Dont change anything here --------
      • Hashtable - Save ASTime as (Key Time) of (Key (Triggering unit)) in ASHashtable
      • Hashtable - Save Handle OfASPlayer as 2 of (Key (Triggering unit)) in ASHashtable
      • Hashtable - Save ASAOE as (Key Aoe) of (Key (Triggering unit)) in ASHashtable
      • Hashtable - Save ASDamage as (Key Damage) of (Key (Triggering unit)) in ASHashtable
      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
      • Custom script: call RemoveLocation(udg_ASCasterPoint)
  • ASPeriodic
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
      • (ASCasterGroup is empty) Equal to False
    • Actions
      • Unit Group - Pick every unit in ASCasterGroup and do (Actions)
        • Loop - Actions
          • Set ASCaster = (Picked unit)
          • Set ASCasterPoint = (Position of ASCaster)
          • -------- Here we load the value that I saved before --------
          • Set ASPlayer = (Load 2 of (Key (Picked unit)) in ASHashtable)
          • Set ASTime = (Load (Key Time) of (Key (Picked unit)) from ASHashtable)
          • Set ASDamage = (Load (Key Damage) of (Key (Picked unit)) from ASHashtable)
          • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
          • -------- Set who will can be targeted , note: you can change boolean to damage more specific unit --------
          • Set ASDamageGroup = (Units within ASAOE of ASCasterPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) belongs to an enemy of ASPlayer) Equal to True))))
          • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
          • -------- This group will make the ray damage only 1 unit in ASDamageGroup --------
          • Set ASRandomGroup = (Random 1 units from ASDamageGroup)
          • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
          • -------- Here I create special effect to had eye candy and show when your spell fade off --------
          • Special Effect - Create a special effect attached to the origin of ASCaster using Abilities\Spells\Items\AIre\AIreTarget.mdl
          • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
          • -------- Here I delete the special effect so it don't leak --------
          • Special Effect - Destroy (Last created special effect)
          • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ASTime Greater than 0.00
            • Then - Actions
              • -------- This a timer system , just don't change this --------
              • Hashtable - Save (ASTime - 0.25) as (Key Time) of (Key (Picked unit)) in ASHashtable
              • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
              • Unit Group - Pick every unit in ASRandomGroup and do (Actions)
                • Loop - Actions
                  • -------- Set the target --------
                  • Set ASTarget = (Picked unit)
                  • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- set his position --------
                  • Set ASTargetPoint = (Position of ASTarget)
                  • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- Here I deal damage to the target --------
                  • Unit - Cause ASCaster to damage ASTarget, dealing ASDamage damage of attack type Spells and damage type Normal
                  • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- Here I create an explosion at the target --------
                  • Unit - Create 1 Arcane Storm[Explosion] for ASPlayer at ASTargetPoint facing ASTargetPoint
                  • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- Store that explosion into a variable --------
                  • Set ASExplosion = (Last created unit)
                  • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- Make it die after 1 seconds --------
                  • Unit - Add a 1.00 second Generic expiration timer to ASExplosion
                  • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- This loop is here to create the ray --------
                  • For each (Integer A) from 1 to 20, do (Actions)
                    • Loop - Actions
                      • -------- Here I set how far in the air the ray will go.Note: you can change the value to what you want --------
                      • Set ASRayFly = (60.00 x (Real((Integer A))))
                      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                      • -------- Here I create the unit that will make the ray --------
                      • Unit - Create 1 Arcane Storm[Ray] for ASPlayer at ASTargetPoint facing ASTargetPoint
                      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                      • -------- Store that unit into a variable --------
                      • Set ASRay = (Last created unit)
                      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                      • -------- this will make that unit die after 1 sec --------
                      • Unit - Add a 1.00 second Generic expiration timer to ASRay
                      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                      • -------- This will make the ray --------
                      • Animation - Change ASRay flying height to ASRayFly at 0.00
                      • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
                  • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
            • Else - Actions
              • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
              • -------- All those actions below will happen when the time will be 0 --------
              • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
              • -------- Here I remove the caster from the unit group that I've put him in ASInit --------
              • Unit Group - Remove ASCaster from ASCasterGroup
              • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
              • -------- This will close that trigger if there noone in that group --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ASCasterGroup is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off ASPeriodic <gen>
                • Else - Actions
              • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
              • -------- Here I clear Leaks --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in ASHashtable
              • Custom script: call RemoveLocation(udg_ASTargetPoint)
              • Custom script: call DestroyGroup(udg_ASDamageGroup)
              • Custom script: call DestroyGroup(udg_ASRandomGroup)
              • Custom script: call RemoveLocation(udg_ASCasterPoint)
              • -------- ----------------------------------------------------------------------------------------------------------------------------- --------
Changelog
v1.00: Uploading
v1.01: changed when the periodic trigger is closed
v1.02: changed space in tooltip to "|n" when i want to change a line
v1.03: Now use hashtable and I changed special effect because i had problem whit it
v1.04: Removed a leak that I forgot

Feel free to change it as long as you give credits

Keywords:
Arcane, Arcane Storm, Mage, Spell, Klingo, Storm, Ray.
Contents

Klingo's Arcane Storm (Map)

Reviews
18:19, 17th Jan 2010 TriggerHappy: Looks MUI and leakless to me.

Moderator

M

Moderator

18:19, 17th Jan 2010
TriggerHappy:

Looks MUI and leakless to me.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
I think that for the on/off system for the trigger you could just check whether the unit group is empty or not after you remove the unit from it. That makes the timer system unnecessary and also removes the need for condition for the looping trigger.

Also check the tooltip. Use |n to change a line, don't use spaces.
 
Level 7
Joined
Dec 19, 2009
Messages
249
I think that for the on/off system for the trigger you could just check whether the unit group is empty or not after you remove the unit from it. That makes the timer system unnecessary and also removes the need for condition for the looping trigger.

Also check the tooltip. Use |n to change a line, don't use spaces.

For the first part , I'll try to fix it.

for the |n , where i put it?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Whenever you need to change a line.

Copy this to your tooltip text:

The Monster calls his arcane power to create arcane's ray every 0.25 seconds for 5 seconds on random enemy around the monster to deal them damage.|n|nLevel 1: 20 damage , 300 Aoe.|nLevel 2: 25 damage , 350 Aoe.|nLevel 3: 30 damage , 400 Aoe.
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
Just use hashtables to avoid custom values, since using custom values in such simple things like a spell has no excuse.

Remove the custom data usage and replace it with hashtable to avoid any conflicts with other resources that uses custom values inside them.

EDIT:

Isn't it \n not |n?
 
Level 7
Joined
Dec 19, 2009
Messages
249
Just use hashtables to avoid custom values, since using custom values in such simple things like a spell has no excuse.

Remove the custom data usage and replace it with hashtable to avoid any conflicts with other resources that uses custom values inside them.

EDIT:

Isn't it \n not |n?

I'm currently trying to learn how to use hashtable but i don't realy understand ^^.

and it's |n not /n
 
Top