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

GUI Wave Spell V 1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
The caster hurls a projectile onwards a direction, dealing damage to enemy units in its path.


  • Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- This stores your custom wave ability. --------
      • Set FS_ABILITY = Wave
      • -------- This determines the max distance of the wave --------
      • Set FS_MAX_DISTANCE = 1200.00
      • -------- This is the rate at which the wave travels. --------
      • Set FS_MISSILE_SPEED = 1200.00
      • -------- The Area of effect. --------
      • Set FS_SPELL_AOE_SIZE = 150.00
      • -------- The Damage dealt to enemy units. (The index refers to the level of the ability.) --------
      • Set FS_MISSILE_DAMAGE[1] = 50.00
      • Set FS_MISSILE_DAMAGE[2] = 100.00
      • Set FS_MISSILE_DAMAGE[3] = 150.00
      • Set FS_MISSILE_DAMAGE[4] = 200.00
      • -------- This is the special effect that appears whenever units get hit by the projectile. --------
      • Set FS_SPFX = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl



  • FSSTART
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to FS_ABILITY
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_INDEX_LISTENER Equal to 0
        • Then - Actions
          • Trigger - Turn on FSLOOP <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_RECYCLE_SIZE Greater than 0
        • Then - Actions
          • Set FS_RECYCLE_SIZE = (FS_RECYCLE_SIZE - 1)
          • Set FS_CURRENT_INDEX = FS_RECYCLE_CONTAINER[FS_RECYCLE_SIZE]
        • Else - Actions
          • Set FS_CURRENT_INDEX = FS_INDEX_SIZE
          • Set FS_INDEX_SIZE = (FS_INDEX_SIZE + 1)
      • -------- IMPORTANT VARIABLES --------
      • Set FS_TRIGGER_UNIT[FS_CURRENT_INDEX] = (Triggering unit)
      • Unit - Create 1 Dummy Missile for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
      • Set FS_MISSILE_UNIT[FS_CURRENT_INDEX] = (Last created unit)
      • Set FS_INITIAL_DISTANCE[FS_CURRENT_INDEX] = 0.00
      • Set FS_ANGLE[FS_CURRENT_INDEX] = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
      • Set FS_PICKED_UNITS[FS_CURRENT_INDEX] = (Units within FS_SPELL_AOE_SIZE of (Position of FS_MISSILE_UNIT[FS_CURRENT_INDEX]) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A flying unit) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Mat
      • -------- IMPORTANT SYSTEM PART START --------
      • Set FS_INDEX_CONTAINER[FS_INDEX_LISTENER] = FS_CURRENT_INDEX
      • Set FS_INDEX_LISTENER = (FS_INDEX_LISTENER + 1)



  • FSLOOP
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- Dynamic Loop --------
      • For each (Integer FS_EXAMPLE_LOOP) from 0 to (FS_INDEX_LISTENER - 1), do (Actions)
        • Loop - Actions
          • -------- Set the current index --------
          • Set FS_CURRENT_INDEX = FS_INDEX_CONTAINER[FS_EXAMPLE_LOOP]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FS_INITIAL_DISTANCE[FS_CURRENT_INDEX] Less than FS_MAX_DISTANCE
            • Then - Actions
              • -------- This nullifies the "Picked Units" Unit Group --------
              • Custom script: call DestroyGroup(udg_FS_PICKED_UNITS[udg_FS_CURRENT_INDEX])
              • Custom script: set udg_FS_PICKED_UNITS[udg_FS_CURRENT_INDEX]=null
              • -------- This serves as a substitute for "Units Within Range etc..." --------
              • Set FS_PICKED_UNITS[FS_CURRENT_INDEX] = (Units within FS_SPELL_AOE_SIZE of (Position of FS_MISSILE_UNIT[FS_CURRENT_INDEX]) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A flying unit) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Mat
              • -------- This makes sure that units will only get damaged once. --------
              • Unit Group - Add all units of FS_PICKED_UNITS[FS_CURRENT_INDEX] to FS_UNITS_DAMAGED[FS_CURRENT_INDEX]
              • Unit Group - Pick every unit in FS_PICKED_UNITS[FS_CURRENT_INDEX] and do (Actions)
                • Loop - Actions
                  • Set FS_PICKED_UNIT = (Picked unit)
                  • Unit - Cause FS_TRIGGER_UNIT[FS_CURRENT_INDEX] to damage FS_PICKED_UNIT, dealing FS_MISSILE_DAMAGE[(Level of FS_ABILITY for FS_TRIGGER_UNIT[FS_CURRENT_INDEX])] damage of attack type Hero and damage type Unknown
                  • Special Effect - Create a special effect attached to the chest of FS_PICKED_UNIT using FS_SPFX
                  • Special Effect - Destroy (Last created special effect)
                  • Set FS_PICKED_UNIT = No unit
              • -------- Makes the dummy missile move. --------
              • Unit - Move FS_MISSILE_UNIT[FS_CURRENT_INDEX] instantly to ((Position of FS_MISSILE_UNIT[FS_CURRENT_INDEX]) offset by (0.03 x FS_MISSILE_SPEED) towards FS_ANGLE[FS_CURRENT_INDEX] degrees)
              • -------- Assures that the missile has travelled the designated distance. --------
              • Set FS_INITIAL_DISTANCE[FS_CURRENT_INDEX] = (FS_INITIAL_DISTANCE[FS_CURRENT_INDEX] + (0.03 x FS_MISSILE_SPEED))
            • Else - Actions
              • -------- The Dummy Missile gets destroyed and the used variables are nullified. --------
              • Unit Group - Remove all units of FS_UNITS_DAMAGED[FS_CURRENT_INDEX] from FS_UNITS_DAMAGED[FS_CURRENT_INDEX]
              • Custom script: call DestroyGroup(udg_FS_PICKED_UNITS[udg_FS_CURRENT_INDEX])
              • Custom script: set udg_FS_PICKED_UNITS[udg_FS_CURRENT_INDEX]=null
              • Unit - Kill FS_MISSILE_UNIT[FS_CURRENT_INDEX]
              • Set FS_TRIGGER_UNIT[FS_CURRENT_INDEX] = No unit
              • Set FS_MISSILE_UNIT[FS_CURRENT_INDEX] = No unit
              • Set FS_INITIAL_DISTANCE[FS_CURRENT_INDEX] = 0.00
              • Set FS_ANGLE[FS_CURRENT_INDEX] = 0.00
              • Set FS_PICKED_UNIT = No unit
              • -------- IMPORTANT SYSTEM PART START --------
              • -------- Decrease the normal index container size --------
              • Set FS_INDEX_LISTENER = (FS_INDEX_LISTENER - 1)
              • -------- Exchange the data from the last index to the current index --------
              • Set FS_INDEX_CONTAINER[FS_EXAMPLE_LOOP] = FS_INDEX_CONTAINER[FS_INDEX_LISTENER]
              • -------- Add an index to the Recycle Container --------
              • Set FS_RECYCLE_CONTAINER[FS_RECYCLE_SIZE] = FS_CURRENT_INDEX
              • -------- Recycle Container Index Size gets increased --------
              • Set FS_RECYCLE_SIZE = (FS_RECYCLE_SIZE + 1)
              • -------- Reset Loop --------
              • Set FS_EXAMPLE_LOOP = (FS_EXAMPLE_LOOP - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FS_INDEX_LISTENER Equal to 0
                • Then - Actions
                  • Trigger - Turn off FSLOOP <gen>
                  • Skip remaining actions
                • Else - Actions
              • -------- IMPORTANT SYSTEM PART END --------


Derived from hanky's Indexing System


Keywords:
shockwave,wave,projectile
Contents

GUI Wave Spell (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Wave Spell V 1.0 | Reviewed by Maker | 16th Oct 2013 NEEDS FIX There is a lot of memory leaks [tr] Things that leak

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.


Wave Spell V 1.0 | Reviewed by Maker | 16th Oct 2013
NEEDS FIX


126248-albums6177-picture66522.png


  • There is a lot of memory leaks
126248-albums6177-picture66524.png
[tr]
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
1.0 Review

Personal Words

Review

Suggestions

Rating

Judgement

Note

None
  • Unit - Create 1 Dummy Missile for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
You leak a location here ^


  • Set FS_ANGLE[FS_CURRENT_INDEX] = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
This ^ leaks, and can be replaced by:
  • Set FS_ANGLE[FS_CURRENT_INDEX] = Facing Angle of (Last Created Unit)

  • Set FS_PICKED_UNITS[FS_CURRENT_INDEX] = (Units within FS_SPELL_AOE_SIZE of (Position of FS_MISSILE_UNIT[FS_CURRENT_INDEX]) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A flying unit) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Mat
You leak other locations here ^


  • Custom script: call DestroyGroup(udg_FS_PICKED_UNITS[udg_FS_CURRENT_INDEX])
  • Custom script: set udg_FS_PICKED_UNITS[udg_FS_CURRENT_INDEX]=null
Those should be after Picking the units in FS_PICKED_UNITS[udg_FS_CURRENT_INDEX] group

If 2 instances of the spell are working at the same time, it will result that ALL other casts of the Spell deal DPS damage instead of Line Damage

Links:
Things that Leak
See how to remove location leaks here ^

Knock-Back 3D
This System allows to make missiles that damage units in a line and many other things
None
225233-albums6523-picture74068.jpg
225233-albums6523-picture74104.jpg

225233-albums6523-picture74105.jpg
If You want me to review an Update of This Spell, Please Notifiy me this by VM or PM
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
These two lines are good-for-nothing.
  • Set FS_INITIAL_DISTANCE[FS_CURRENT_INDEX] = 0.00
  • Set FS_ANGLE[FS_CURRENT_INDEX] = 0.00
  • Unit - Cause FS_TRIGGER_UNIT[FS_CURRENT_INDEX] to damage FS_PICKED_UNIT, dealing FS_MISSILE_DAMAGE[(Level of FS_ABILITY for FS_TRIGGER_UNIT[FS_CURRENT_INDEX])] damage of attack type Hero and damage type Unknown
->Something like:
FS_MISSLE_DAMGE + FS_MISSLE_DAMAGE_INCREASE x Level of Ability for FS_TRIGGER_UNIT[FS_CURRENT_INDEX]

You leak locations:
http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
You name wrong varriable >.<.
FS_TRIGGER_UNIT => Fs_Trigger_Unit.
--
THIS: Using for configuration

and this:

  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • FS_INDEX_LISTENER Equal to 0
  • Then - Actions
  • Trigger - Turn on FSLOOP <gen>
  • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • FS_RECYCLE_SIZE Greater than 0
  • Then - Actions
  • Set FS_RECYCLE_SIZE = (FS_RECYCLE_SIZE - 1)
  • Set FS_CURRENT_INDEX = FS_RECYCLE_CONTAINER[FS_RECYCLE_SIZE]
  • Else - Actions
  • Set FS_CURRENT_INDEX = FS_INDEX_SIZE
  • Set FS_INDEX_SIZE = (FS_INDEX_SIZE + 1)
  • -------- IMPORTANT VARIABLES --------
  • Set FS_TRIGGER_UNIT[FS_CURRENT_INDEX] = (Triggering unit)
  • Unit - Create 1 Dummy Missile for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
  • Set FS_MISSILE_UNIT[FS_CURRENT_INDEX] = (Last created unit)
  • Set FS_INITIAL_DISTANCE[FS_CURRENT_INDEX] = 0.00
  • Set FS_ANGLE[FS_CURRENT_INDEX] = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
  • Set FS_PICKED_UNITS[FS_CURRENT_INDEX] = (Units within FS_SPELL_AOE_SIZE of (Position of FS_MISSILE_UNIT[FS_CURRENT_INDEX]) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A flying unit) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Mat
  • -------- IMPORTANT SYSTEM PART START --------
  • Set FS_INDEX_CONTAINER[FS_INDEX_LISTENER] = FS_CURRENT_INDEX
  • Set FS_INDEX_LISTENER = (FS_INDEX_LISTENER + 1)
instead of this

  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • FS_RECYCLE_SIZE Greater than 0
  • Then - Actions
  • Set FS_RECYCLE_SIZE = (FS_RECYCLE_SIZE - 1)
  • Set FS_CURRENT_INDEX = FS_RECYCLE_CONTAINER[FS_RECYCLE_SIZE]
  • Else - Actions
  • Set FS_CURRENT_INDEX = FS_INDEX_SIZE
  • Set FS_INDEX_SIZE = (FS_INDEX_SIZE + 1)
  • -------- IMPORTANT VARIABLES --------
  • Set FS_TRIGGER_UNIT[FS_CURRENT_INDEX] = (Triggering unit)
  • Unit - Create 1 Dummy Missile for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
  • Set FS_MISSILE_UNIT[FS_CURRENT_INDEX] = (Last created unit)
  • Set FS_INITIAL_DISTANCE[FS_CURRENT_INDEX] = 0.00
  • Set FS_ANGLE[FS_CURRENT_INDEX] = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
  • Set FS_PICKED_UNITS[FS_CURRENT_INDEX] = (Units within FS_SPELL_AOE_SIZE of (Position of FS_MISSILE_UNIT[FS_CURRENT_INDEX]) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A flying unit) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Mat
  • -------- IMPORTANT SYSTEM PART START --------
  • Set FS_INDEX_CONTAINER[FS_INDEX_LISTENER] = FS_CURRENT_INDEX
  • Set FS_INDEX_LISTENER = (FS_INDEX_LISTENER + 1)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • FS_INDEX_LISTENER Equal to 1
  • Then - Actions
  • Trigger - Turn on FSLOOP <gen>
  • Else - Actions
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Quoted by:"Dynamic Indexing is pretty buggy sometimes, Use Indexing Arrays or Linked List"
Also we did already have this spell in Object Editor and it is configurable in speed, damage, max distance, final damage, area of effect, missile model, caster effect release. Maybe making spells something unique ^^, good job!, Keep Practicing!
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
Quoted by:"Dynamic Indexing is pretty buggy sometimes, Use Indexing Arrays or Linked List"
Also we did already have this spell in Object Editor and it is configurable in speed, damage, max distance, final damage, area of effect, missile model, caster effect release. Maybe making spells something unique ^^, good job!, Keep Practicing!

Look at the bottom of the review tab in my review :3
 
Top