• 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.

Timed_Destructibles 0.05

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Update!!!

This is a system which you can create timed expiring destructibles.


-Destructible types
-Destructible Facing angle
-Destructible variation
-Destructible scale
-Destructible expiry time
-NEW!!! Dynamic Indexed
-NEW!!! Sample Spell (LINE)
-NEW!!! Sample Spell (CIRCLE)

I'm a beginner GUI spell maker. I've noticed there is a timed expiration timer you
can add to a unit it really helps a lot because you don't have to place timed waits before removing/killing those units, also I've noticed destructible making is a permanent process.
So I thought If there is a way to add destructibles to spells without worrying about its
"being-permanent" so I thought of making this.

have fun with it, also please rate and comment...

  • Destructible Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Destructible Create
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EX_Index_size Equal to 0
        • Then - Actions
          • Trigger - Turn on Destructible Cast Loop <gen>
        • Else - Actions
      • -------- Increase the index size --------
      • Set EX_Index_size = (EX_Index_size + 1)
      • -------- Dynamic Index --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EX_Index_size Greater than EX_Index_max_size
        • Then - Actions
          • Set EX_Index[EX_Index_size] = EX_Index_size
          • Set EX_Index_max_size = EX_Index_size
        • Else - Actions
      • -------- Dynamic Index End --------
      • Set Ex_Temp_int = EX_Index[EX_Index_size]
      • Set EX_Test[Ex_Temp_int] = True
      • -------- Changable values are found below --------
      • -------- The caster --------
      • Set EX_Caster[Ex_Temp_int] = (Casting unit)
      • -------- The target point --------
      • Set EX_Target_point[Ex_Temp_int] = (Target point of ability being cast)
      • -------- The destructible type --------
      • Set EX_Destructible_type[Ex_Temp_int] = Ashenvale Tree Wall
      • -------- The angle of the destructible --------
      • Set EX_Destructible_angle[Ex_Temp_int] = (Facing of EX_Caster[Ex_Temp_int])
      • -------- The scale of the destructible --------
      • Set EX_Destructible_scale[Ex_Temp_int] = (Random real number between 0.80 and 1.25)
      • -------- The variation of the destructible --------
      • Set EX_Destructible_variation[Ex_Temp_int] = (Random integer number between 1 and 5)
      • -------- The creation and vanishing effect of the destructible --------
      • Set EX_Destructible_effect[Ex_Temp_int] = Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl
      • -------- The timed life of the destructible --------
      • Set EX_Destructible_Time[Ex_Temp_int] = 20.00
  • Destructible Cast Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer EX_Loop) from 1 to EX_Index_size, do (Actions)
        • Loop - Actions
          • -------- Now how the Destructible has reached it expiration time --------
          • Set Ex_Temp_int = EX_Index[EX_Loop]
          • -------- Now how the Destructible has reached it expiration time --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EX_Destructible_Time[Ex_Temp_int] Greater than 0.00
            • Then - Actions
              • -------- This part tells the loop when to create the destructible --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EX_Test[Ex_Temp_int] Equal to True
                • Then - Actions
                  • -------- Now create the destructible --------
                  • Destructible - Create a EX_Destructible_type[Ex_Temp_int] at EX_Target_point[Ex_Temp_int] facing EX_Destructible_angle[Ex_Temp_int] with scale EX_Destructible_scale[Ex_Temp_int] and variation EX_Destructible_variation[Ex_Temp_int]
                  • Set EX_Destructible[Ex_Temp_int] = (Last created destructible)
                  • -------- Add some effects when created --------
                  • Special Effect - Create a special effect at EX_Target_point[Ex_Temp_int] using EX_Destructible_effect[Ex_Temp_int]
                  • Special Effect - Destroy (Last created special effect)
                  • -------- Turns the creation off, so the loop won't create anymore --------
                  • Set EX_Test[Ex_Temp_int] = False
                • Else - Actions
              • -------- The time of the destructible is reduced here --------
              • Set EX_Destructible_Time[Ex_Temp_int] = (EX_Destructible_Time[Ex_Temp_int] - 0.05)
            • Else - Actions
              • -------- The time of the destructible has now ended time to remove it --------
              • Destructible - Remove EX_Destructible[Ex_Temp_int]
              • -------- add some vanishing effects --------
              • Special Effect - Create a special effect at EX_Target_point[Ex_Temp_int] using EX_Destructible_effect[Ex_Temp_int]
              • Special Effect - Destroy (Last created special effect)
              • -------- remove leak --------
              • Custom script: call RemoveLocation(udg_EX_Target_point[udg_Ex_Temp_int])
              • -------- RecycleIndex --------
              • Set EX_Index[EX_Loop] = EX_Index[EX_Index_size]
              • Set EX_Index[EX_Index_size] = Ex_Temp_int
              • Set EX_Index_size = (EX_Index_size - 1)
              • Set EX_Loop = (EX_Loop - 1)
              • -------- Turn the loop off --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EX_Index_size Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
  • Samp1 Straight
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Create Destructibles (line)
    • Actions
      • Set EX_Temp_point3 = (Position of (Triggering unit))
      • Set EX_Temp_point = (Target point of ability being cast)
      • Set EX_Line_angle = (Angle from EX_Temp_point3 to EX_Temp_point)
      • For each (Integer EX_Circle_loop) from 1 to 14, do (Actions)
        • Loop - Actions
          • Set EX_Line_offset = (EX_Line_offset + 75.00)
          • Set EX_Temp_point2 = (EX_Temp_point3 offset by EX_Line_offset towards EX_Line_angle degrees)
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at EX_Temp_point2 facing Default building facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add Create a Destructible to (Last created unit)
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave EX_Temp_point2
          • Custom script: call RemoveLocation(udg_EX_Temp_point2)
      • Set EX_Line_offset = 0.00
      • Custom script: call RemoveLocation(udg_EX_Temp_point)
      • Custom script: call RemoveLocation(udg_EX_Temp_point3)
  • Samp2 Circle
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Create Destructibles (circle)
    • Actions
      • Set EX_Temp_point = (Target point of ability being cast)
      • For each (Integer EX_Circle_loop) from 1 to 14, do (Actions)
        • Loop - Actions
          • Set EX_Temp_point2 = (EX_Temp_point offset by 200.00 towards ((Real(EX_Circle_loop)) x 28.00) degrees)
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at EX_Temp_point2 facing Default building facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add Create a Destructible to (Last created unit)
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave EX_Temp_point2
          • Custom script: call RemoveLocation(udg_EX_Temp_point2)
      • Custom script: call RemoveLocation(udg_EX_Temp_point)
Keywords:
Destructible,Timed,Expire,Tree,Rock,Create,Make,Time,Timer,MUI,GUI,Exavier00,Dynamic,index,indexing
Contents

Timed Destructibles (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Why would you use expiration timer and a looping trigger that works like a timer? The loop only does something during the first loop (that should be done at cast) and during the last loop...

Moderator

M

Moderator

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

Maker, Timed_Destructibles 0.05, 12:17, 4th Nov 2011

Why would you use expiration timer and a looping trigger that works like a timer?
The loop only does something during the first loop (that should be done at cast) and during the last loop.
You could create a dummy and save the handle of all destructables that are created for that instance into a hashtable. When the dummy dies, load the destructables and destroy them.
I'm thinking that could make the system too simple, but we will have to see.
 
I don't see you reducing EX_Index so it will never be zero once you cast the spell even once, meaning the timed loop will run forever... which is not good... also clearing the array data isn't really necessary as they are globals....

And I suggest you learn dynamic indexing... [btw, EX_Index is pretty useless, learn dynamic indexing and you can remove it]
 
Level 5
Joined
Jul 7, 2010
Messages
69
I don't see you reducing EX_Index so it will never be zero once you cast the spell even once, meaning the timed loop will run forever... which is not good... also clearing the array data isn't really necessary as they are globals....

And I suggest you learn dynamic indexing... [btw, EX_Index is pretty useless, learn dynamic indexing and you can remove it]

sorry I got careless... I've just updated it.
 
Level 5
Joined
Jul 7, 2010
Messages
69
to Tachael please speak English on the form the translation is "what to do" this is also offtopic please don't do it

ontopic
this system has a lot of potential i would love to see futer updates from it

Yes I would... once I've learned Dynamic Indexing.

Quote
-100% leak free (I'm not certain about this)
Then please don't say this.
Strange indexing here. You seem to have executed this properly. Though I find it hard to imagine a use for this. Perhaps create a sample? Anyway I'll give you a 4/5 for effort and execution, but the idea... Meh.
I would consider renaming this "Timed Destructibles"

Hahaha I changed the name... Timed Destructibles Does sound a lot better.
 
Top