• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

Playing around with creating my first spell GUI

Status
Not open for further replies.
Level 7
Joined
Sep 8, 2011
Messages
211
Hey guys. I've never created a spell before but I've been using triggers quite a lot in maps I've created (I created an ammo/clip system for one of my maps). These triggers are not to complex but I figured I should attempt a basic spell.

I took the spell Fan of Knives and changed it around making the missiles homing and decided to make a similar/better version in GUI.

So here it is. I tired to make it as customize-able as possible.

This is not the final version however, the way I created the spell may have a ton of leaks or has bad uses of triggers (I know its not MUI yet) but this was the most simplistic way I could think of to make the spell work, even though it may not be the best way.

I'm looking for help on how to improve it, I am just learning about hashtables at the moment (I attempted to used hashtables for the damage the pusuers do, but it didn't work so I removed that). Everything I want it to do here is done, I just want to make the triggers efficient, leakless, less buggy and MUI.


Here are the triggers:

The Hexer summons Dark Pursuers to chase and damage random enemy units by damaging on contact with their target. These creatures last 6 seconds and will find a new target if their current one is dead. Multiple pursuers can target the same unit.
Level 1 - 40 damage + 3 x int
Level 2 - 60 damage + 3 x int
Level 3 - 80 damage + 3 x int


  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Damage Delt --------
      • Set DP_Base_Damage = 20
      • -------- This will be added to the base damage even at level one. --------
      • Set DP_Damage_Increase_Per_Level = 20
      • -------- Range at which the pursuers will target an enemy --------
      • Set DP_Range = 600.00
      • -------- Number of missiles means the number of missiles fired PER LEVEL --------
      • -------- This means if the variable is 5, at level one it will fire 5 pusuers, at level two it will fire 10 pursuers --------
      • Set DP_Number_Of_Missiles = 5
      • -------- How long the missile lasts --------
      • Set DP_Missile_Lifetime = 6.00
      • -------- The speed the pusuer goes --------
      • Set DP_Movementspeed = 400.00
      • -------- This is the pursuer unit type --------
      • Set DP_Unit = Dark Pursuer
  • Dark Pursuers
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Dark Pursuers
    • Actions
      • Set DP_Caster = (Casting unit)
      • Set DP_Point = (Position of DP_Caster)
      • Set DP_Enemy_Targets = (Units within DP_Range of DP_Point matching ((((Matching unit) belongs to an enemy of (Owner of DP_Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DP_Enemy_Targets is empty) Equal to False
          • (All units of DP_Enemy_Targets are dead) Equal to False
        • Then - Actions
          • For each (Integer A) from 1 to (DP_Number_Of_Missiles x (Level of Dark Pursuers for DP_Caster)), do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dark Pursuer for (Owner of (Casting unit)) at (DP_Point offset by ((Random real number between 1.00 and 5.00), (Random real number between 1.00 and 5.00))) facing Default building facing degrees
              • Unit - Set (Last created unit) movement speed to DP_Movementspeed
              • Unit - Add a DP_Missile_Lifetime second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Attack (Random unit from DP_Enemy_Targets)
        • Else - Actions
      • Custom script: call RemoveLocation (udg_DP_Point)
      • Custom script: call DestroyGroup (udg_DP_Enemy_Targets)
  • DP Damage Check
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacking unit)) Equal to Dark Pursuer
        • Then - Actions
          • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (((Real(DP_Base_Damage)) + ((Real(DP_Damage_Increase_Per_Level)) x (Real((Level of Dark Pursuers for DP_Caster))))) + ((Real((Intelligence of DP_Caster (Include bonuses)))) x 3.00)) damage of attack type Spells and damage type Magic
          • Unit - Kill (Attacking unit)
        • Else - Actions
Thanks for reading.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Looks good so far.
However, you could use a few more temporary variables.
(A temporary variable is a simple global variable that can be used by all triggers.)
Example: TempUnit, TempLocation, TempGroup, TempPlayer, etc.
(all temp variables could be arrays)

For example in "DP Damage Check":
You use (Attacking unit) 3 times in that trigger.
You should "Set TempUnit[0] = Attacking unit" and then use TempUnit[0] instead.

Same for all other things.
The unit group loops for each unit and checks if they match the filter.
So for every unit, you check if they are an enemy of an owner of a unit.
You should set that player in a TempPlayer variable.
(I would suggest just making the group without filter and use a Loop for that group and place an If/Then/Else inside it.
It is just easier to read and modify but it might help.

Leaks etc are good. Cant find anything wrong.

I would suggest using a damage detection system for the Dark Pursuers instead of the "A unit is attacked" event.
I would like to recommend you a good system but none of the ones I have seen so far are actually working 100% and completely compatible with GUI.
The difference would be that they will damage and die when they land their attack rather than when they start attacking.
What you could do as well is use an ability and order the dark persuer to use that ability instead when they attack a unit.

Also, one thing that could make the importing easier is to save the ability id in a global variable.
Then you can check if ability being cast is equal to that variable instead.
 
Level 7
Joined
Sep 8, 2011
Messages
211
Thank you so much for the feedback Wietlol! :)

I did a bit of tweaking, I added a variable for the ability (like you suggested) and changed the other triggers a bit. Here are the updated triggers.

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Damage Delt --------
      • Set DP_Base_Damage = 20
      • -------- This will be added to the base damage even at level one. --------
      • Set DP_Damage_Increase_Per_Level = 20
      • -------- Range at which the pursuers will target an enemy --------
      • Set DP_Range = 600.00
      • -------- Number of missiles means the number of missiles fired PER LEVEL --------
      • -------- This means if the variable is 5, at level one it will fire 5 pusuers, at level two it will fire 10 pursuers --------
      • Set DP_Number_Of_Missiles = 5
      • -------- How long the missile lasts --------
      • Set DP_Missile_Lifetime = 6.00
      • -------- The speed the pusuer goes --------
      • Set DP_Movementspeed = 400.00
      • -------- This is the pursuer unit type --------
      • Set DP_Unit = Dark Pursuer
      • -------- The Dark Pusuers Ability --------
      • Set DP_Ability = Dark Pursuers
  • Dark Pursuers
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to DP_Ability
    • Actions
      • Set DP_Caster = (Casting unit)
      • Set DP_Point = (Position of DP_Caster)
      • Set DP_TempPlayer = (Owner of DP_Caster)
      • Set DP_Enemy_Targets = (Units within DP_Range of DP_Point matching ((((Matching unit) belongs to an enemy of DP_TempPlayer) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
      • For each (Integer A) from 1 to (DP_Number_Of_Missiles x (Level of Dark Pursuers for DP_Caster)), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DP_Enemy_Targets is empty) Equal to False
              • (All units of DP_Enemy_Targets are dead) Equal to False
            • Then - Actions
              • Unit - Create 1 Dark Pursuer for DP_TempPlayer at (DP_Point offset by ((Random real number between 1.00 and 5.00), (Random real number between 1.00 and 5.00))) facing Default building facing degrees
              • Set DP_TempUnit[3] = (Last created unit)
              • Unit - Set DP_TempUnit[3] movement speed to DP_Movementspeed
              • Unit - Add a DP_Missile_Lifetime second Generic expiration timer to DP_TempUnit[3]
              • Unit - Order DP_TempUnit[3] to Attack (Random unit from DP_Enemy_Targets)
            • Else - Actions
      • Custom script: call RemoveLocation (udg_DP_Point)
      • Custom script: call DestroyGroup (udg_DP_Enemy_Targets)
  • DP Damage Check
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set DP_TempUnit[0] = (Attacked unit)
      • Set DP_TempUnit[1] = (Attacking unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of DP_TempUnit[1]) Equal to Dark Pursuer
        • Then - Actions
          • Unit - Cause DP_TempUnit[1] to damage DP_TempUnit[0], dealing (((Real(DP_Base_Damage)) + ((Real(DP_Damage_Increase_Per_Level)) x (Real((Level of Dark Pursuers for DP_Caster))))) + ((Real((Intelligence of DP_Caster (Include bonuses)))) x 3.00)) damage of attack type Spells and damage type Magic
          • Unit - Kill DP_TempUnit[1]
        • Else - Actions
As for a DDS, they seem scary lol. I didn't know there was any out there working well for GUI atm.

I am not sure if it is better to have the dark pusuers attack to cause the trigger or cast an ability. The thing about having it attack is they dark pursuers look for nearby targets if their original target is dead. I don't think that would do the same if it was a spell.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well... There is none that I have seen that works 100% for GUI as well...
I am creating one as we speak but it is a heavy one.
But it works completely for all kinds of damages (even knows the difference between a basic attack and triggered damage that does physical damage).
And you dont even need more than the simple GUI function to do the triggered damage.

It is originally made for custom stats but with a little help of simple actions, it became a damage detection system instead of a damage engine itself.

Also, yea replacing attacks with an ability does require a lot of testing and a lot of triggering... it might be better to use attacks for now.

As for the triggers, you do know how to use the arrays as I read the "DP Damage Check"
But you do not have to use a new number inside the "Dark Pursuers" trigger.
You can use 0 just like in the "DP Damage Check" trigger.
All you have to think about is if multiple units should have been stored at the same time.
However in the DP Damage Check trigger, you only use (Attacked unit) once, so you dont really have to place that one inside a variable.
When you use those things multiple times, you should but if not, then its fine.

One more thing, do not use the event "A unit Begins casting an ability"
Instead use "A unit Starts the effect of an ability".

When you are casting an ability, the unit will start to cast it.
Then the cast event is fired.
Then the unit will channel the casting time (i think so) (wait Cast Point + Casting Time)
Then the effect has started.
Then the effect event is fired.
Then the mana will be taken and the ability will go on cooldown.
Then the unit will finish the casting animation and after that he finished the spell.
Then the finish event is fired.

So you should use the "Starts the effect of an ability" event rather than "Begins casting an ability".
 
Level 7
Joined
Sep 8, 2011
Messages
211
Oh yeah I get it now, thanks so much for the help!

I'm not to sure what else I can really do to add to the triggers for now.

I just did a quick test where an enemy hero would cast the spell to see if there were any bugs and from what I can see it seems like it is MUI.
 
Level 7
Joined
Sep 8, 2011
Messages
211
After I spent more time learning hashtables I think I just made the spell successfully MUI. Can anyone else make sure I'm not just seeing things?

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Damage Delt --------
      • Set DP_Base_Damage = 20
      • -------- This will be added to the base damage even at level one. --------
      • Set DP_Damage_Increase_Per_Level = 20
      • -------- Range at which the pursuers will target an enemy --------
      • Set DP_Range = 600.00
      • -------- Number of missiles means the number of missiles fired PER LEVEL --------
      • -------- This means if the variable is 5, at level one it will fire 5 pusuers, at level two it will fire 10 pursuers --------
      • Set DP_Number_Of_Missiles = 5
      • -------- How long the missile lasts --------
      • Set DP_Missile_Lifetime = 6.00
      • -------- The speed the pusuer goes --------
      • Set DP_Movementspeed = 400.00
      • -------- This is the pursuer unit type --------
      • Set DP_Unit = Dark Pursuer
      • -------- The Dark Pusuers Ability --------
      • Set DP_Ability = Dark Pursuers
      • -------- Leave this --------
      • Hashtable - Create a hashtable
      • Set dpTable = (Last created hashtable)
  • Dark Pursuers
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DP_Ability
    • Actions
      • Set DP_Caster = (Casting unit)
      • Set DP_Point = (Position of DP_Caster)
      • Set DP_TempPlayer = (Owner of DP_Caster)
      • Set DP_Enemy_Targets = (Units within DP_Range of DP_Point matching ((((Matching unit) belongs to an enemy of DP_TempPlayer) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
      • For each (Integer A) from 1 to (DP_Number_Of_Missiles x (Level of Dark Pursuers for DP_Caster)), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DP_Enemy_Targets is empty) Equal to False
              • (All units of DP_Enemy_Targets are dead) Equal to False
            • Then - Actions
              • Unit - Create 1 Dark Pursuer for DP_TempPlayer at (DP_Point offset by ((Random real number between 1.00 and 5.00), (Random real number between 1.00 and 5.00))) facing Default building facing degrees
              • Hashtable - Save (Intelligence of DP_Caster (Include bonuses)) as 0 of (Key (Last created unit)) in dpTable
              • Hashtable - Save (Level of DP_Ability for DP_Caster) as 1 of (Key (Last created unit)) in dpTable
              • Set DP_TempUnit[0] = (Last created unit)
              • Unit - Set DP_TempUnit[0] movement speed to DP_Movementspeed
              • Unit - Add a DP_Missile_Lifetime second Generic expiration timer to DP_TempUnit[0]
              • Unit - Order DP_TempUnit[0] to Attack (Random unit from DP_Enemy_Targets)
            • Else - Actions
      • Custom script: call RemoveLocation (udg_DP_Point)
      • Custom script: call DestroyGroup (udg_DP_Enemy_Targets)
  • DP Damage Check
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set DP_TempUnit[0] = (Attacked unit)
      • Set DP_TempUnit[1] = (Attacking unit)
      • Set DP_Caster_Int = (Load 0 of (Key (Attacking unit)) from dpTable)
      • Set DP_Level_Bonus_Damage = (Load 1 of (Key (Attacking unit)) from dpTable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of DP_TempUnit[1]) Equal to Dark Pursuer
        • Then - Actions
          • Unit - Cause DP_TempUnit[1] to damage DP_TempUnit[0], dealing (((Real(DP_Base_Damage)) + ((Real(DP_Damage_Increase_Per_Level)) x (Real(DP_Level_Bonus_Damage)))) + ((Real(DP_Caster_Int)) x 3.00)) damage of attack type Spells and damage type Magic
          • Hashtable - Clear all child hashtables of child (Key (Attacking unit)) in dpTable
          • Unit - Kill DP_TempUnit[1]
        • Else - Actions
Also here is the map if anyone is curious.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
The idea of the spell is good enough to upload it there.
However, you would have to change the hashtable thing then.
Hashtables are generally slow, so they will be a pain in the ass if you use them for every spell.
Also, there is a limit of 255 hashtables in a map.
After that, hashtables just dont get created.
you only use a little piece of the hashtable so you can use NewTable (which is a resource by bribe (he made NewTable, I forgot who made the original one) and it combines all those shitty hashtables that use only one or two rows into one big hashtable.

However, there is an even better solution and that is using a unit indexer.
Then you just create two real arrays and use the custom data of the attacker (which is a unique integer if you have a unit indexer) to save and load the data from the array.
This is kind of the best way to store "MUI" data on a unit.

When you have changed it in either of those, you should have a good spell.
 
Level 7
Joined
Sep 8, 2011
Messages
211
Okay so after messing around and a lot of reading, I think I brought in the unit indexer and managed to make it MUI + working as intended.

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Damage Delt --------
      • Set DP_Base_Damage = 20
      • -------- This will be added to the base damage even at level one. --------
      • Set DP_Damage_Increase_Per_Level = 20
      • -------- Int Multiplier --------
      • Set DP_IntMultiplier = 3
      • -------- Range at which the pursuers will target an enemy --------
      • Set DP_Range = 600.00
      • -------- Number of missiles means the number of missiles fired PER LEVEL --------
      • -------- This means if the variable is 5, at level one it will fire 5 pusuers, at level two it will fire 10 pursuers --------
      • Set DP_Number_Of_Missiles = 5
      • -------- How long the missile lasts --------
      • Set DP_Missile_Lifetime = 6.00
      • -------- The speed the pusuer goes. *150 is recommended* --------
      • Set DP_Movementspeed = 400.00
      • -------- This is the pursuer unit type --------
      • Set DP_Unit = Dark Pursuer
      • -------- The Dark Pusuers Ability --------
      • Set DP_Ability = Dark Pursuers
  • Dark Pursuers
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DP_Ability
    • Actions
      • Set DP_maxIndex = (DP_maxIndex + 1)
      • Set DP_Caster[DP_maxIndex] = (Casting unit)
      • Set DP_Point = (Position of DP_Caster[DP_maxIndex])
      • Set DP_TempPlayer = (Owner of DP_Caster[DP_maxIndex])
      • Set DP_Enemy_Targets = (Units within DP_Range of DP_Point matching ((((Matching unit) belongs to an enemy of DP_TempPlayer) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
      • For each (Integer A) from 1 to (DP_Number_Of_Missiles x (Level of DP_Ability for DP_Caster[DP_maxIndex])), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DP_Enemy_Targets is empty) Equal to False
              • (All units of DP_Enemy_Targets are dead) Equal to False
            • Then - Actions
              • Set DP_DamageToDeal[DP_maxIndex] = ((DP_Base_Damage + (DP_Damage_Increase_Per_Level x (Level of DP_Ability for DP_Caster[DP_maxIndex]))) + ((Intelligence of DP_Caster[DP_maxIndex] (Include bonuses)) x DP_IntMultiplier))
              • Unit - Create 1 Dark Pursuer for DP_TempPlayer at (DP_Point offset by ((Random real number between 1.00 and 5.00), (Random real number between 1.00 and 5.00))) facing Default building facing degrees
              • Set DP_TempUnit[0] = (Last created unit)
              • Unit - Set the custom value of DP_TempUnit[0] to DP_DamageToDeal[DP_maxIndex]
              • Unit - Set DP_TempUnit[0] movement speed to DP_Movementspeed
              • Unit - Add a DP_Missile_Lifetime second Generic expiration timer to DP_TempUnit[0]
              • Unit - Order DP_TempUnit[0] to Attack (Random unit from DP_Enemy_Targets)
            • Else - Actions
      • Custom script: call RemoveLocation (udg_DP_Point)
      • Custom script: call DestroyGroup (udg_DP_Enemy_Targets)
  • DP Damage Check
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set DP_TempUnit[0] = (Attacked unit)
      • Set DP_TempUnit[1] = (Attacking unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of DP_TempUnit[1]) Equal to Dark Pursuer
        • Then - Actions
          • Set DP_TempUnitVaule = (Custom value of DP_TempUnit[1])
          • Unit - Cause DP_TempUnit[1] to damage DP_TempUnit[0], dealing (Real(DP_TempUnitVaule)) damage of attack type Spells and damage type Magic
          • Unit - Kill DP_TempUnit[1]
        • Else - Actions
I hope I understood the unit indexer well. Do I actually need to still use the Unit Indexer trigger for this to work properly?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Not really.
Create a new Real array called DP_DamageArray (for example).
Then you set DP_DamageArray[Custom Data of TempUnit[0]] = <dmg>
Then when you load the damage, you load again with the index of the custom data.
(When you use custom data multiple times, you should have it stored in a variable.)
(The custom data is automatically made by the unit indexer.)
 
Level 7
Joined
Sep 8, 2011
Messages
211
Alright so you mean like this? (I have the game text there for checking the damage it deals). The damage does work but every time you cast the spell, one of the dark pursuers deals 0 damage.

  • Dark Pursuers
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DP_Ability
    • Actions
      • Set DP_maxIndex = (DP_maxIndex + 1)
      • Set DP_Caster[DP_maxIndex] = (Casting unit)
      • Set DP_Point = (Position of DP_Caster[DP_maxIndex])
      • Set DP_TempPlayer = (Owner of DP_Caster[DP_maxIndex])
      • Set DP_Enemy_Targets = (Units within DP_Range of DP_Point matching ((((Matching unit) belongs to an enemy of DP_TempPlayer) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False))))
      • For each (Integer A) from 1 to (DP_Number_Of_Missiles x (Level of DP_Ability for DP_Caster[DP_maxIndex])), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DP_Enemy_Targets is empty) Equal to False
              • (All units of DP_Enemy_Targets are dead) Equal to False
            • Then - Actions
              • Set DP_DamageArray[(Custom value of DP_TempUnit[0])] = (((Real(DP_Base_Damage)) + ((Real(DP_Damage_Increase_Per_Level)) x (Real((Level of DP_Ability for DP_Caster[DP_maxIndex]))))) + ((Real((Intelligence of DP_Caster[DP_maxIndex] (Include bonuses)))) x (Real(DP_IntMultiplier))))
              • Unit - Create 1 Dark Pursuer for DP_TempPlayer at (DP_Point offset by ((Random real number between 1.00 and 5.00), (Random real number between 1.00 and 5.00))) facing Default building facing degrees
              • Game - Display to (All players) for 3.00 seconds the text: (String(DP_DamageArray[(Custom value of DP_TempUnit[0])]))
              • Set DP_TempUnit[0] = (Last created unit)
              • Unit - Set DP_TempUnit[0] movement speed to DP_Movementspeed
              • Unit - Add a DP_Missile_Lifetime second Generic expiration timer to DP_TempUnit[0]
              • Unit - Order DP_TempUnit[0] to Attack (Random unit from DP_Enemy_Targets)
            • Else - Actions
      • Custom script: call RemoveLocation (udg_DP_Point)
      • Custom script: call DestroyGroup (udg_DP_Enemy_Targets)
  • DP Damage Check
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set DP_TempUnit[0] = (Attacked unit)
      • Set DP_TempUnit[1] = (Attacking unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of DP_TempUnit[1]) Equal to Dark Pursuer
        • Then - Actions
          • Set DP_TempUnitVaule = (Integer(DP_DamageArray[(Custom value of DP_TempUnit[1])]))
          • Game - Display to (All players) for 3.00 seconds the text: (String(DP_TempUnitVaule))
          • Unit - Cause DP_TempUnit[1] to damage DP_TempUnit[0], dealing (Real(DP_TempUnitVaule)) damage of attack type Spells and damage type Magic
          • Unit - Kill DP_TempUnit[1]
        • Else - Actions
Edit: Saw an error. Moved the DamageArray below the TempUnit.
 
Status
Not open for further replies.
Top