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

Split Shot ability doesn't do the damage it is supposed to do..

Status
Not open for further replies.
Level 19
Joined
Jul 14, 2011
Messages
875
Here's a solution using Weep's GDD.

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to An AWESOME spell
    • Actions
      • Set Spell_ArrayMax = (Spell_ArrayMax + 1)
      • Set Spell_Caster[Spell_ArrayMax] = (Triggering unit)
      • Set Spell_Agillity[Spell_ArrayMax] = (Agility of Spell_Caster[Spell_ArrayMax] (Include bonuses))
      • Set Spell_SpellLevel[Spell_ArrayMax] = (Level of An AWESOME spell for Spell_Caster[Spell_ArrayMax])
      • Set Spell_TempLoc = (Position of Spell_Caster[Spell_ArrayMax])
      • Set Spell_BuffGroupArray[Spell_ArrayMax] = (Units within 250.00 of Spell_TempLoc matching (((Owner of Spell_Caster[Spell_ArrayMax]) is an enemy of (Owner of (Matching unit))) Equal to True))
      • Unit Group - Pick every unit in Spell_BuffGroupArray[Spell_ArrayMax] and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for (Owner of Spell_Caster[Spell_ArrayMax]) at Spell_TempLoc facing Default building facing degrees
          • Unit - Turn collision for (Last created unit) Off
          • Custom script: call SetUnitX (bj_lastCreatedUnit,GetLocationX(udg_Spell_TempLoc))
          • Custom script: call SetUnitY (bj_lastCreatedUnit,GetLocationY(udg_Spell_TempLoc))
          • Unit - Add Dummy to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Spell_TempLoc)
  • GetHit
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit has buff dat buff ) Equal to True
      • GDD_Damage Equal to 0.00
    • Actions
      • For each (Integer Spell_ForInteger) from 1 to Spell_ArrayMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (GDD_DamagedUnit is in Spell_BuffGroupArray[Spell_ForInteger]) Equal to True
            • Then - Actions
              • Unit Group - Remove GDD_DamagedUnit from Spell_BuffGroupArray[Spell_ForInteger]
              • Unit - Cause Spell_Caster[Spell_ArrayMax] to damage GDD_DamagedUnit, dealing (Real(((3 x Spell_Agillity[Spell_ArrayMax]) + (Spell_SpellLevel[Spell_ArrayMax] x Spell_Agillity[Spell_ArrayMax])))) damage of attack type Spells and damage type Normal
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in Spell_BuffGroupArray[Spell_ForInteger]) Equal to 0
                • Then - Actions
                  • Set Spell_BuffGroupArray[Spell_ForInteger] = Spell_BuffGroupArray[Spell_ArrayMax]
                  • Set Spell_Caster[Spell_ForInteger] = Spell_Caster[Spell_ArrayMax]
                  • Set Spell_SpellLevel[Spell_ForInteger] = Spell_SpellLevel[Spell_ArrayMax]
                  • Set Spell_Agillity[Spell_ForInteger] = Spell_Agillity[Spell_ArrayMax]
                  • Set Spell_ArrayMax = (Spell_ArrayMax - 1)
                • Else - Actions
            • Else - Actions
Yeah, it can be done without GDD, but that would cause alot of lag.
I can't think of a better way of accurately dealing the needed damage other than using a DDS. The others cause massive amounts of lag. Luckily, GDD is REALLY easy to setup.
You can configure anything in the object editor, except the radius around the hero and the damage dealt - they are in the trigger editor.
I have the feeling I missed something, but I'm not really sure what :p

Oh, dont mind the names, I was lazy.

EDIT: Also, better post the triggers in
tags, otherwise it stretches the screen alot and it becomes annoying.
 
Last edited:
Level 14
Joined
Jul 19, 2007
Messages
767
Here's a solution using Weep's GDD.

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to An AWESOME spell
    • Actions
      • Set Spell_ArrayMax = (Spell_ArrayMax + 1)
      • Set Spell_Caster[Spell_ArrayMax] = (Triggering unit)
      • Set Spell_Agillity[Spell_ArrayMax] = (Agility of Spell_Caster[Spell_ArrayMax] (Include bonuses))
      • Set Spell_SpellLevel[Spell_ArrayMax] = (Level of An AWESOME spell for Spell_Caster[Spell_ArrayMax])
      • Set Spell_TempLoc = (Position of Spell_Caster[Spell_ArrayMax])
      • Set Spell_BuffGroupArray[Spell_ArrayMax] = (Units within 250.00 of Spell_TempLoc matching (((Owner of Spell_Caster[Spell_ArrayMax]) is an enemy of (Owner of (Matching unit))) Equal to True))
      • Unit Group - Pick every unit in Spell_BuffGroupArray[Spell_ArrayMax] and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for (Owner of Spell_Caster[Spell_ArrayMax]) at Spell_TempLoc facing Default building facing degrees
          • Unit - Turn collision for (Last created unit) Off
          • Custom script: call SetUnitX (bj_lastCreatedUnit,GetLocationX(udg_Spell_TempLoc))
          • Custom script: call SetUnitY (bj_lastCreatedUnit,GetLocationY(udg_Spell_TempLoc))
          • Unit - Add Dummy to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Spell_TempLoc)
  • GetHit
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit has buff dat buff ) Equal to True
      • GDD_Damage Equal to 0.00
    • Actions
      • For each (Integer Spell_ForInteger) from 1 to Spell_ArrayMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (GDD_DamagedUnit is in Spell_BuffGroupArray[Spell_ForInteger]) Equal to True
            • Then - Actions
              • Unit Group - Remove GDD_DamagedUnit from Spell_BuffGroupArray[Spell_ForInteger]
              • Unit - Cause Spell_Caster[Spell_ArrayMax] to damage GDD_DamagedUnit, dealing (Real(((3 x Spell_Agillity[Spell_ArrayMax]) + (Spell_SpellLevel[Spell_ArrayMax] x Spell_Agillity[Spell_ArrayMax])))) damage of attack type Spells and damage type Normal
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in Spell_BuffGroupArray[Spell_ForInteger]) Equal to 0
                • Then - Actions
                  • Set Spell_BuffGroupArray[Spell_ForInteger] = Spell_BuffGroupArray[Spell_ArrayMax]
                  • Set Spell_Caster[Spell_ForInteger] = Spell_Caster[Spell_ArrayMax]
                  • Set Spell_SpellLevel[Spell_ForInteger] = Spell_SpellLevel[Spell_ArrayMax]
                  • Set Spell_Agillity[Spell_ForInteger] = Spell_Agillity[Spell_ArrayMax]
                  • Set Spell_ArrayMax = (Spell_ArrayMax - 1)
                • Else - Actions
            • Else - Actions
Yeah, it can be done without GDD, but that would cause alot of lag.
I can't think of a better way of accurately dealing the needed damage other than using a DDS. The others cause massive amounts of lag. Luckily, GDD is REALLY easy to setup.
You can configure anything in the object editor, except the radius around the hero and the damage dealt - they are in the trigger editor.
I have the feeling I missed something, but I'm not really sure what :p

Oh, dont mind the names, I was lazy.

EDIT: Also, better post the triggers in
tags, otherwise it stretches the screen alot and it becomes annoying.
Ehm.. If think u've missunderstod how my spell should work like. It's not meant to automatically shot Cold Arrows to units around the casting Hero. The Hero actually choose a target enemy unit and then it will shot a Cold Arrow to the target enemy and all enemy units around it within a 250 AOE. Read the ability describtion I posted on my first message in this thread..
 
Level 19
Joined
Jul 14, 2011
Messages
875
Woops, I misread the description you posted, here is a more similar version.
Hope I didnt miss anything this time :p

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to An AWESOME spell
    • Actions
      • Set Spell_ArrayMax = (Spell_ArrayMax + 1)
      • Set Spell_Caster[Spell_ArrayMax] = (Triggering unit)
      • Set Spell_Agillity[Spell_ArrayMax] = (Agility of Spell_Caster[Spell_ArrayMax] (Include bonuses))
      • Set Spell_SpellLevel[Spell_ArrayMax] = (Level of An AWESOME spell for Spell_Caster[Spell_ArrayMax])
      • Set Spell_TempLoc = (Position of (Target unit of ability being cast))
      • Set Spell_BuffGroupArray[Spell_ArrayMax] = (Units within 250.00 of Spell_TempLoc matching (((Owner of Spell_Caster[Spell_ArrayMax]) is an enemy of (Owner of (Matching unit))) Equal to True))
      • Set Spell_TempLoc = (Position of Spell_Caster[Spell_ArrayMax])
      • Unit Group - Pick every unit in Spell_BuffGroupArray[Spell_ArrayMax] and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for (Owner of Spell_Caster[Spell_ArrayMax]) at Spell_TempLoc facing Default building facing degrees
          • Unit - Turn collision for (Last created unit) Off
          • Custom script: call SetUnitX (bj_lastCreatedUnit,GetLocationX(udg_Spell_TempLoc))
          • Custom script: call SetUnitY (bj_lastCreatedUnit,GetLocationY(udg_Spell_TempLoc))
          • Unit - Add Dummy to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Spell_TempLoc)
  • GetHit
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit has buff dat buff ) Equal to True
      • GDD_Damage Equal to 0.00
      • (Unit-type of GDD_DamageSource) Equal to Dummy
    • Actions
      • For each (Integer Spell_ForInteger) from 1 to Spell_ArrayMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (GDD_DamagedUnit is in Spell_BuffGroupArray[Spell_ForInteger]) Equal to True
            • Then - Actions
              • Unit Group - Remove GDD_DamagedUnit from Spell_BuffGroupArray[Spell_ForInteger]
              • Unit - Cause Spell_Caster[Spell_ArrayMax] to damage GDD_DamagedUnit, dealing (Real(((3 x Spell_Agillity[Spell_ArrayMax]) + (Spell_SpellLevel[Spell_ArrayMax] x Spell_Agillity[Spell_ArrayMax])))) damage of attack type Spells and damage type Normal
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in Spell_BuffGroupArray[Spell_ForInteger]) Equal to 0
                • Then - Actions
                  • Set Spell_BuffGroupArray[Spell_ForInteger] = Spell_BuffGroupArray[Spell_ArrayMax]
                  • Set Spell_Caster[Spell_ForInteger] = Spell_Caster[Spell_ArrayMax]
                  • Set Spell_SpellLevel[Spell_ForInteger] = Spell_SpellLevel[Spell_ArrayMax]
                  • Set Spell_Agillity[Spell_ForInteger] = Spell_Agillity[Spell_ArrayMax]
                  • Custom script: call DestroyGroup (udg_Spell_BuffGroupArray[udg_Spell_ArrayMax])
                  • Set Spell_ArrayMax = (Spell_ArrayMax - 1)
                • Else - Actions
            • Else - Actions
EDIT: It appears I did miss something, gonna update the post as soon as I get to the WE :p
EDIT2: Fixed.
 

Attachments

  • Split Shot.w3x
    30.5 KB · Views: 24
Last edited:
Status
Not open for further replies.
Top