• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Math Graphs 1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This "spell pack" consists of two spells.

The first one called Sin(x) damages/slows ms/slows as of units in an area and displays the graph of the function sin(x).

The second spell is called Cos(x) heals units in an area and displays the graph of .... COS(X) (what a shocker).

I find them pretty cool (in quite a nerdy way).


Sin(x):
  • Sinx
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sin(x)
    • Actions
      • -------- Initialise the needed variables --------
      • Set sinx_caster_l = (Position of (Triggering unit))
      • -------- If you want to change the size of the graph edit the size, the half axis length variables and change the Sin(x) radius in the object editor --------
      • Set sinx_multiplier = 15.00
      • Set sinx_half_length = 50.00
      • -------- We'll use the "For Loop A" variable for the X that we feed our function. --------
      • -------- Although the range X e [-50; 50] is too small so we'll multiply it by a number chosen above in the sinx_multiplier variable --------
      • -------- On each for loop cycle we'll draw 1 point of the X axis, the Y axis and 1 point of the function. --------
      • For each (Integer A) from ((Integer(sinx_half_length)) x -1) to (Integer(sinx_half_length)), do (Actions)
        • Loop - Actions
          • -------- Here we draw a point of the X axis --------
          • Set sinx_temp = (sinx_caster_l offset by (((Real((Integer A))) x sinx_multiplier), 0.00))
          • Special Effect - Create a special effect at sinx_temp using Objects\Spawnmodels\Other\IllidanFootprint\IllidanSpawnFootPrint0.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_sinx_temp)
          • -------- Here we draw a point of the Y axis --------
          • Set sinx_temp = (sinx_caster_l offset by (0.00, ((Real((Integer A))) x sinx_multiplier)))
          • Special Effect - Create a special effect at sinx_temp using Objects\Spawnmodels\Other\IllidanFootprint\IllidanSpawnFootPrint0.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_sinx_temp)
          • -------- And here we draw a point of the function --------
          • Set sinx_temp = (sinx_caster_l offset by ((Real(((Integer A) x (Integer(sinx_multiplier))))), ((Sin(((Real((Integer A))) x sinx_multiplier))) x (2.00 x sinx_half_length))))
          • Special Effect - Create a special effect at sinx_temp using Objects\Spawnmodels\Other\IllidanFootprint\IllidanSpawnFootPrint0.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_sinx_temp)
      • -------- Here we'll draw a circle around our axises with the the same radius as the radios of the dmg of our spell --------
      • -------- And the size of our axises which we can get by multiplying the sinx_multiplier and the sinx_half_length --------
      • For each (Integer A) from -36 to 36, do (Actions)
        • Loop - Actions
          • Set sinx_temp = (sinx_caster_l offset by (sinx_half_length x sinx_multiplier) towards ((Real((Integer A))) x 10.00) degrees)
          • Special Effect - Create a special effect at sinx_temp using Objects\Spawnmodels\Other\IllidanFootprint\IllidanSpawnFootPrint0.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_sinx_temp)
      • -------- The rest displays a floating text above the heads of all living enemies in range of the spell --------
      • Set sinx_text_group = (Units within (sinx_half_length x sinx_multiplier) of sinx_caster_l matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)))
      • Custom script: call RemoveLocation(udg_sinx_caster_l)
      • Unit Group - Pick every unit in sinx_text_group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 10) Equal to 1
            • Then - Actions
              • Floating Text - Create floating text that reads DAFUQ?!?! above (Picked unit) with Z offset 50.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
            • Else - Actions
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Custom script: call DestroyGroup(udg_sinx_text_group)
----------------------------------------------------------------------------
Cos(x):
  • Cosx
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cos(x)
    • Actions
      • Set sinx_caster_l = (Position of (Triggering unit))
      • Set sinx_half_length = 50.00
      • Set sinx_multiplier = 15.00
      • For each (Integer A) from ((Integer(sinx_half_length)) x -1) to (Integer(sinx_half_length)), do (Actions)
        • Loop - Actions
          • -------- Since the model that we use for the cos(x) graph will dissapear instantlly after we destroy the special effect --------
          • -------- we put every special effect that we create in an arrays and then destroy every SE after a few second --------
          • Set sinx_temp = (sinx_caster_l offset by (((Real((Integer A))) x sinx_multiplier), 0.00))
          • Special Effect - Create a special effect at sinx_temp using Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
          • Set cosx_effects[cosx_counter] = (Last created special effect)
          • Set cosx_counter = (cosx_counter + 1)
          • Custom script: call RemoveLocation(udg_sinx_temp)
          • Set sinx_temp = (sinx_caster_l offset by (0.00, ((Real((Integer A))) x sinx_multiplier)))
          • Special Effect - Create a special effect at sinx_temp using Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
          • Set cosx_effects[cosx_counter] = (Last created special effect)
          • Set cosx_counter = (cosx_counter + 1)
          • Custom script: call RemoveLocation(udg_sinx_temp)
          • Set sinx_temp = (sinx_caster_l offset by ((Real(((Integer A) x (Integer(sinx_multiplier))))), ((Cos(((Real((Integer A))) x sinx_multiplier))) x (2.00 x sinx_half_length))))
          • Special Effect - Create a special effect at sinx_temp using Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
          • Set cosx_effects[cosx_counter] = (Last created special effect)
          • Set cosx_counter = (cosx_counter + 1)
          • Custom script: call RemoveLocation(udg_sinx_temp)
      • For each (Integer A) from -36 to 36, do (Actions)
        • Loop - Actions
          • Set sinx_temp = (sinx_caster_l offset by (sinx_half_length x sinx_multiplier) towards ((Real((Integer A))) x 10.00) degrees)
          • Special Effect - Create a special effect at sinx_temp using Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
          • Set cosx_effects[cosx_counter] = (Last created special effect)
          • Set cosx_counter = (cosx_counter + 1)
          • Custom script: call RemoveLocation(udg_sinx_temp)
      • Set cosx_healgroup = (Units within (sinx_half_length x sinx_multiplier) of sinx_caster_l matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True)))
      • Custom script: call RemoveLocation(udg_sinx_caster_l)
      • Unit Group - Pick every unit in cosx_healgroup and do (Actions)
        • Loop - Actions
          • -------- We'll also heal the units in this spell instead of only writing stuff above their head --------
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 300.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Not equal to (Triggering unit)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 10) Equal to 1
                • Then - Actions
                  • Floating Text - Create floating text that reads AWESOME MATH BRO!!!... above (Picked unit) with Z offset 50.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                • Else - Actions
            • Else - Actions
              • Floating Text - Create floating text that reads I KNOW RIGHT?!? above (Picked unit) with Z offset 50.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Custom script: call DestroyGroup(udg_cosx_healgroup)
      • -------- Activate the timer which will triger the trigger that will destroy the special effects --------
      • Countdown Timer - Start cosx_timer as a One-shot timer that will expire in 5.00 seconds
Cos(x) cleanup:
  • CosxRemoveStuff
    • Events
      • Time - cosx_timer expires
    • Conditions
    • Actions
      • For each (Integer A) from 0 to (cosx_counter - 1), do (Special Effect - Destroy cosx_effects[(Integer A)])
      • Set cosx_counter = 0


Keywords:
math,spells,thunder clap, fan of knives, sin, cos, aoe, dmg, healing, heal
Contents

Math is Awesome (Map)

Reviews
11:19, 10th Nov 2013 Maker: The system has only a few comments and no ratings, this tells me it is not that interesting or useful. The spells itself are not useful either. The only thing potentially useful are the sin and cos functions, and by...

Moderator

M

Moderator

11:19, 10th Nov 2013
Maker: The system has only a few comments and no ratings, this
tells me it is not that interesting or useful.
The spells itself are not useful either. The only thing potentially
useful are the sin and cos functions, and by themselves they are
too simple.
 
Not MUI (special effect) This requires a configuration trigger, also I would make a comment about the novelty of the spell - it draws a graph (or rather displays one but doesn't actually add anything to spell, the only valuable part of the effects if the circle as a region marker, the floating texts should be removed, they're pointless. Exceptionally simplistic beyond the effects which basically contribute nothing other than a picture. It'd be fairly easy with a configuration trigger to combine the spells into one single trigger which they both ran off with a configuration and the graph drawing would be much more controllable. (f(x) notation). You should not use Integer(A) use your own defined integer variable. Requires a proper tooltip and object editor data (learn icons and such)

Just a basic overview to work with, more or less this could be done in a few moment in the object editor bar the graph effect which does nothing.
 
Top