1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[GUI][MUI] Colour Spray v1.5

Submitted by RoboHippo
This bundle is marked as approved. It works and satisfies the submission rules.

Colour Spray



This is mostly inspired by the Dungeons and Dragons spell of the same name. I wanted to make something pretty, so here it is.

Description:


Brings forth a cascade of bedazzling lights, disorienting enemy units in a frontward arc. The closer the unit, the longer it will remain stunned.

Triggers


Setup

  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Creates the hashtable for effects --------
      • Hashtable - Create a hashtable
      • Set ColSpray_Hash = (Last created hashtable)
      • -------- The number of levels the spell has --------
      • Set ColSpray_Data_Levels = 3
      • -------- The size of the effect's arc, in degrees --------
      • Set ColSpray_Levels_ArcAngle[1] = 90.00
      • Set ColSpray_Levels_ArcAngle[2] = 100.00
      • Set ColSpray_Levels_ArcAngle[3] = 110.00
      • -------- The length the cone extends --------
      • Set ColSpray_Levels_MaxDistance[1] = 250.00
      • Set ColSpray_Levels_MaxDistance[2] = 350.00
      • Set ColSpray_Levels_MaxDistance[3] = 450.00
      • -------- The longest a unit can be stunned for --------
      • Set ColSpray_Levels_MaxDuration[1] = 6.00
      • Set ColSpray_Levels_MaxDuration[2] = 8.00
      • Set ColSpray_Levels_MaxDuration[3] = 10.00
      • -------- The number of lights to be sprayed fo the effect (multiples of LightsPerTick (below) are best) --------
      • Set ColSpray_Data_Lights = 162
      • -------- The number of lights to be sprayed every 0.05 seconds (multiples of the number of spell levels are best) --------
      • Set ColSpray_Data_LightsPerTick = 9
      • -------- The possible colours of each light --------
      • Set ColSpray_Data_Colors[0] = (Color of Player 1 (Red))
      • Set ColSpray_Data_Colors[1] = (Color of Player 2 (Blue))
      • Set ColSpray_Data_Colors[2] = (Color of Player 3 (Teal))
      • Set ColSpray_Data_Colors[3] = (Color of Player 4 (Purple))
      • Set ColSpray_Data_Colors[4] = (Color of Player 5 (Yellow))
      • Set ColSpray_Data_Colors[5] = (Color of Player 6 (Orange))
      • Set ColSpray_Data_Colors[6] = (Color of Player 7 (Green))
      • Set ColSpray_Data_Colors[7] = (Color of Player 8 (Pink))
      • Set ColSpray_Data_Colors[8] = (Color of Player 9 (Gray))
      • Set ColSpray_Data_Colors[9] = (Color of Player 10 (Light Blue))



On Cast

  • On Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Colour Spray
    • Actions
      • -------- Retrieve level-specific data --------
      • Set ColSpray_Data_MaxDistance = ColSpray_Levels_MaxDistance[(Level of (Ability being cast) for (Triggering unit))]
      • Set ColSpray_Data_MaxDuration = ColSpray_Levels_MaxDuration[(Level of (Ability being cast) for (Triggering unit))]
      • Set ColSpray_Data_ArcAngle = ColSpray_Levels_ArcAngle[(Level of (Ability being cast) for (Triggering unit))]
      • -------- Determine the points of the caster and target, and the angle between them. --------
      • Set ColSpray_Vars_CastPoint = (Target point of ability being cast)
      • Set ColSpray_Vars_CasterPoint = (Position of (Triggering unit))
      • Set ColSpray_Vars_CastDir = (Angle from ColSpray_Vars_CasterPoint to ColSpray_Vars_CastPoint)
      • -------- Blizzard does angle-betweens odd... converts negatives to over 180's. --------
      • If (ColSpray_Vars_CastDir Less than 0.00) then do (Set ColSpray_Vars_CastDir = (ColSpray_Vars_CastDir + 360.00)) else do (Do nothing)
      • -------- Find units in range. --------
      • Set ColSpray_Groups_AffectedUnits = (Units within ColSpray_Data_MaxDistance of ColSpray_Vars_CasterPoint matching (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to False))
      • Unit Group - Pick every unit in ColSpray_Groups_AffectedUnits and do (Actions)
        • Loop - Actions
          • -------- Find position of a unit, and the angle to it from the casting point. --------
          • Set ColSpray_Vars_UnitPoint = (Position of (Picked unit))
          • Set ColSpray_Vars_UnitDir = (Angle from ColSpray_Vars_CasterPoint to ColSpray_Vars_UnitPoint)
          • -------- Blizzard does angle-betweens odd... converts negatives to over 180's. --------
          • If (ColSpray_Vars_UnitDir Less than 0.00) then do (Set ColSpray_Vars_UnitDir = (ColSpray_Vars_UnitDir + 360.00)) else do (Do nothing)
          • -------- Find the difference between the casting angle, and the angle to that unit. --------
          • Set ColSpray_Vars_AngleDif = (Abs((ColSpray_Vars_CastDir - ColSpray_Vars_UnitDir)))
          • -------- If the unit is alive, in the arc, a ground unit, and not immune to magic, stun it. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is A ground unit) Equal to True
              • ((Picked unit) is Magic Immune) Equal to False
              • ColSpray_Vars_AngleDif Less than or equal to (ColSpray_Data_ArcAngle / 2.00)
            • Then - Actions
              • -------- Determine distance from caster. --------
              • Set ColSpray_Vars_Distance = (Distance between ColSpray_Vars_CasterPoint and ColSpray_Vars_UnitPoint)
              • -------- Determine duration (based on distance, and max duration) --------
              • -------- If you are one quarter of the max distance away, you'll get three quarters of the duration. --------
              • Set ColSpray_Vars_Duration = (ColSpray_Vars_Distance / ColSpray_Data_MaxDistance)
              • Set ColSpray_Vars_Duration = (1.00 - ColSpray_Vars_Duration)
              • Set ColSpray_Vars_Duration = (ColSpray_Vars_Duration x ColSpray_Data_MaxDuration)
              • Set ColSpray_Vars_Duration = (ColSpray_Vars_Duration + (1.00 - (ColSpray_Vars_Duration mod 1.00)))
              • -------- Stun the unit --------
              • Unit - Create 1 Colour Spray Stunner for (Owner of (Triggering unit)) at ColSpray_Vars_CastPoint facing ColSpray_Vars_UnitPoint
              • Unit - Set level of Stun for (Last created unit) to (Integer(ColSpray_Vars_Duration))
              • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
      • -------- Create an effect, which sprays a certain amount of lights into the area of effect. --------
      • Unit Group - Add (Triggering unit) to ColSpray_Groups_Casters
      • Hashtable - Save ColSpray_Vars_CastDir as 0 of (Key (Triggering unit)) in ColSpray_Hash
      • Hashtable - Save ColSpray_Data_Lights as 1 of (Key (Triggering unit)) in ColSpray_Hash
      • Hashtable - Save ColSpray_Data_ArcAngle as 2 of (Key (Triggering unit)) in ColSpray_Hash
      • Hashtable - Save (Level of (Ability being cast) for (Triggering unit)) as 3 of (Key (Triggering unit)) in ColSpray_Hash
      • -------- Cleanup --------
      • Custom script: call DestroyGroup( udg_ColSpray_Groups_AffectedUnits )
      • Custom script: call RemoveLocation( udg_ColSpray_Vars_CastPoint )
      • Custom script: call RemoveLocation( udg_ColSpray_Vars_CasterPoint )
      • Custom script: call RemoveLocation( udg_ColSpray_Vars_UnitPoint )



Lights Spawn

  • Lights Spawn
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • (ColSpray_Groups_Casters is empty) Equal to False
    • Actions
      • Unit Group - Pick every unit in ColSpray_Groups_Casters and do (Actions)
        • Loop - Actions
          • Set ColSpray_Vars_CastDir = (Load 0 of (Key (Picked unit)) from ColSpray_Hash)
          • Set ColSpray_Vars_LightsLeft = (Load 1 of (Key (Picked unit)) from ColSpray_Hash)
          • Set ColSpray_Data_ArcAngle = (Load 2 of (Key (Picked unit)) from ColSpray_Hash)
          • Set ColSpray_Vars_SpellLevel = (Load 3 of (Key (Picked unit)) from ColSpray_Hash)
          • Set ColSpray_Vars_UnitPoint = (Position of (Picked unit))
          • Set Temp_Real = ((Real(ColSpray_Data_LightsPerTick)) x ((Real(ColSpray_Vars_SpellLevel)) / (Real(ColSpray_Data_Levels))))
          • For each (Integer Temp_Int) from 1 to (Integer(Temp_Real)), do (Actions)
            • Loop - Actions
              • Set ColSpray_Vars_UnitDir = ColSpray_Vars_CastDir
              • Unit - Create 1 Colour Spray Light for Neutral Passive at ColSpray_Vars_UnitPoint facing (ColSpray_Vars_CastDir + (Random real number between ((ColSpray_Data_ArcAngle / 2.00) x -1.00) and (ColSpray_Data_ArcAngle / 2.00))) degrees
              • Unit Group - Add (Last created unit) to ColSpray_Groups_Lights
              • Unit - Change color of (Last created unit) to ColSpray_Data_Colors[(Random integer number between 0 and 9)]
              • Unit - Add a ((Random real number between 0.30 and 0.70) x ((Real(ColSpray_Vars_SpellLevel)) / (Real(ColSpray_Data_Levels)))) second Generic expiration timer to (Last created unit)
              • Unit - Turn collision for (Last created unit) Off
          • Set ColSpray_Vars_LightsLeft = (ColSpray_Vars_LightsLeft - ColSpray_Data_LightsPerTick)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ColSpray_Vars_LightsLeft Less than or equal to 0
            • Then - Actions
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in ColSpray_Hash
              • Unit Group - Remove (Picked unit) from ColSpray_Groups_Casters
            • Else - Actions
              • Hashtable - Save ColSpray_Vars_LightsLeft as 1 of (Key (Picked unit)) in ColSpray_Hash
      • Custom script: call RemoveLocation( udg_ColSpray_Vars_MovePoint )
      • Custom script: call RemoveLocation( udg_ColSpray_Vars_UnitPoint )



Move Lights

  • Move Lights
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • (ColSpray_Groups_Lights is empty) Equal to False
    • Actions
      • Unit Group - Pick every unit in ColSpray_Groups_Lights and do (Actions)
        • Loop - Actions
          • Set ColSpray_Vars_UnitPoint = (Position of (Picked unit))
          • Set ColSpray_Vars_MovePoint = (ColSpray_Vars_UnitPoint offset by 18.00 towards (Facing of (Picked unit)) degrees)
          • Unit - Move (Picked unit) instantly to ColSpray_Vars_MovePoint



Related Death

  • Related Death
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Colour Spray Light
        • Then - Actions
          • Unit Group - Remove (Dying unit) from ColSpray_Groups_Lights
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Dying unit) is in ColSpray_Groups_Casters) Equal to True
            • Then - Actions
              • Hashtable - Clear all child hashtables of child (Key (Dying unit)) in ColSpray_Hash
              • Unit Group - Remove (Dying unit) from ColSpray_Groups_Casters
            • Else - Actions





Change Log

v1.1:
-Increased trigger efficiency
-Lumped all death triggers into one (Related Death)

v1.2:
-Units are stunned instead of paused
-Removed "Update Duration" trigger (no longer needed)
-Arc for the affected area now scales with level

v1.3:
-Effects now scale with level

v1.4:
-Fixed effect not showing when units were affected

v1.5:
-Fixed effect sometimes not showing when casting towards the Northwest o_O


Keywords:
color, colour, spray, cone, wave, arc, stun, paralyze, light, Dungeons, Dragons, AoE, crowd, control
Contents

Colour Spray v1.5 (Map)

Reviews
Moderator
11:34, 28th Jul 2010 TriggerHappy: Thanks for updating your spell.
  1. 11:34, 28th Jul 2010
    TriggerHappy:

    Thanks for updating your spell.
     
  2. RoboHippo

    RoboHippo

    Joined:
    Mar 2, 2008
    Messages:
    171
    Resources:
    3
    Icons:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    I just want to thank wyrmlord for his hashtable tutorial, without which I wouldn't know how to make any half-decent MUI spell. :grin:

    (subscribing)
     
    Last edited: Jul 28, 2010
  3. WaremDarkslayer

    WaremDarkslayer

    Joined:
    Dec 25, 2008
    Messages:
    88
    Resources:
    3
    Models:
    2
    Maps:
    1
    Resources:
    3
    That is a LOT of triggers for just one spell. However, GUI doesn't give you much of a choice .Haven't tested it yet so I won't rate it until I do.(I'll update my post when I have)

    Tested it and: it doesn't seem to leak and it has nice effects. Also, the stun seems to work nicely.

    However I don't think you should use so many triggers for just one spell, since it is not necessary to put the actions of some triggers in different triggers.

    In short, since most map makers wouldn't pick this spell (if they are lazy)
    but it is a spell that doesn't leak and is eye candy I will give it a 3/5, although if you reduce the amount of triggers of this spell I will give it +1/5 to 4/5.
     
    Last edited: Jul 28, 2010
  4. Septimus

    Septimus

    Joined:
    May 3, 2008
    Messages:
    4,174
    Resources:
    49
    Packs:
    1
    Maps:
    35
    Spells:
    8
    Tutorials:
    5
    Resources:
    49
    don't use casting or dying unit, use triggering unit cause it is instant.

    also, trigger that share the same event could all been done in a single trigger.

    separating them was rather a bad idea cause it just like you are calling 2 ppl to make you a cup of coffee while all you need was just 1 person.

    don't use integer A, create your own integer to used it.

    well, i take a quick glance and this is what i saw soo far.. did't really read the code carefully yet.
     
  5. RoboHippo

    RoboHippo

    Joined:
    Mar 2, 2008
    Messages:
    171
    Resources:
    3
    Icons:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    I made Septimus' changes; now for for TriggerHappy's...
     
    Last edited: Jul 28, 2010
  6. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    JUST ONE THING

    Eye candy
     
  7. RoboHippo

    RoboHippo

    Joined:
    Mar 2, 2008
    Messages:
    171
    Resources:
    3
    Icons:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    There!

    I made all recommended changes (thanks!), and improved the spell in a couple of other areas:
    -The arc of the spell can now be changed on a per-level basis
    -The visual effect's angle, size, and power are all now based on level

    Then just pretend it's an effect system. :razz:
     
  8. Br3akth3w1nd

    Br3akth3w1nd

    Joined:
    Aug 27, 2008
    Messages:
    124
    Resources:
    0
    Resources:
    0
    ok wtf.. I activate the spell and no effects? I am testing it with 1.24 ver warcarft 3 but I see nothing of that which is on the screenshot. All it does is stun the enemy. I took a look at the triggers and it really is suppose to spawn dummy units but wtf.. guess its something from my wc3 ;/ Nice spell tho I was wondering how to make a stun effect like that.
     
  9. RoboHippo

    RoboHippo

    Joined:
    Mar 2, 2008
    Messages:
    171
    Resources:
    3
    Icons:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Yeah, I think I just bugged it when it affects units... fixing...

    EDIT: That appears to be fixed. It was an integer rounding error. I had to convert some things to reals.

    @TriggerHappy: I fixed that, too.
     
  10. Apheraz Lucent

    Apheraz Lucent

    Joined:
    Jan 31, 2010
    Messages:
    3,315
    Resources:
    4
    Tutorials:
    4
    Resources:
    4
    I wonder if it leaks because of overflow of units/special effects.
     
  11. Cocobo

    Cocobo

    Joined:
    May 13, 2009
    Messages:
    38
    Resources:
    3
    Spells:
    3
    Resources:
    3
    this spell is cool and full colour.....
     
  12. Lambdadelta

    Lambdadelta

    Joined:
    Jul 6, 2009
    Messages:
    721
    Resources:
    1
    Maps:
    1
    Resources:
    1
  13. Laserdude

    Laserdude

    Joined:
    Jun 30, 2010
    Messages:
    246
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    You could actually make a nice simillar spell using less triggers.
    Simply crate a dummy unit at the position of the caster, or more units for a nicer effect, and make them cast a cluster rockets with no effect and you add the units later as you have done, and you will have your stun and arc, it won't look as nice, but I think it is an easier way to make the spell you have made, and your spell allows you to easily adjust the ammount of units and a more precise stun.

    The triggers are a bit advanced and not something you can import into your map and change the way you like it.
    It is however a nice spell and it could be changed if you know what you're doing.
    I'll give it a 4/5 at the moment, bacause I would like:
    -Longer cast range
    -The spell to do some damage (atleast make a trigger that you can import and CHANGE so that it does damage)
    -Animation at each unit hit by a light, this would look nice, but can be hard.
    If you think i am too hard on you because these things are'nt supposed to be in the spell, then another reason for the 4/5 is because I think it lacks some effects.
     
  14. Aspard

    Aspard

    Joined:
    Jul 2, 2008
    Messages:
    595
    Resources:
    1
    Spells:
    1
    Resources:
    1
    That's pretty cool, if you ask me.

    +1 to Eyecandy :p

    I don't even understand, why hadn't anybody created such a spell yet :)
    Good job.
     
  15. Bluebay

    Bluebay

    Joined:
    May 7, 2008
    Messages:
    100
    Resources:
    7
    Icons:
    1
    Maps:
    1
    Spells:
    5
    Resources:
    7
    Cool, but a bit laggy if you use it too much at the same time.
     
  16. RoboHippo

    RoboHippo

    Joined:
    Mar 2, 2008
    Messages:
    171
    Resources:
    3
    Icons:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    The effect can be scaled, if you're worried about lag. :wink:
     
  17. illegalpie

    illegalpie

    Joined:
    Aug 20, 2009
    Messages:
    90
    Resources:
    0
    Resources:
    0
    Can you add some damage to it? I'd like to use it in a map I have, but it requires damage, Please and thanks, Or tell me how, im OK with the editor, but I dont understand crap in yours haha, too many, but still, i'd give it a 5/5 for Eyecandy, I've been looking for something like this
     
  18. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    you can add damage to the dummy stormbolt spell or add a Unit - Damage unit action on the part where he casts the storm bolt to stun the units (on the onCast trigger)
     
  19. UngThanhNhan

    UngThanhNhan

    Joined:
    Jan 30, 2013
    Messages:
    116
    Resources:
    0
    Resources:
    0
    Awesome! Maybe they are wisps with colorful arts:goblin_yeah: