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

Triggered Pulverize

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
I wanted to simulate the Pulverize effect with triggers to add attribute bonus dmg. I'd like to know if it's well done, or how could I improve it.

  • Pulverize Bonus Damage
    • Events
      • Game - GDD_Event becomes Not equal to 0.00
    • Conditions
      • GDD_Damage Not equal to 0.00
      • (Level of Pulverize for GDD_DamageSource) Greater than 0
      • (Random integer number between 1 and 15) Less than or equal to (5 + (Level of Pulverize for GDD_DamageSource))
    • Actions
      • Set Temp_Point = (Position of GDD_DamagedUnit)
      • Set Temp_Group = (Units within 250.00 of Temp_Point matching ((((Matching unit) belongs to an enemy of (Owner of GDD_DamageSource)) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Set Pulverize_Damage = (((Real((Level of Pulverize for GDD_DamageSource))) x 10.00) + ((Real((Strength of GDD_DamageSource (Include bonuses)))) + (0.10 x (Real((Level of Pulverize for GDD_DamageSource))))))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause GDD_DamageSource to damage (Picked unit), dealing Pulverize_Damage damage of attack type Spells and damage type Normal
      • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_Temp_Group)
EDIT: I'm using 'not equal to 0' because I have had problems with it using 'Equal to 0' since it triggers even when the dmg is 0, wich is no damage at all.

I guess I could make some Int variables to sore some values and make the lines shorter... :p
 
Last edited:
Damage Event or GDD.

Improvement:
  • Set Temp_Group = (Units within 250.00 of Temp_Point matching ((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
  • Unit Group - Pick every unit in Temp_Group and do (Actions)
    • Loop - Actions
      • Unit - Cause (Attacking unit) to damage (Picked unit), dealing Pulverize_Damage damage of attack type Spells and damage type Normal
  • Custom script: call DestroyGroup(udg_Temp_Group)
->>
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 250.00 of Temp_Point matching ((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is alive) Equal to True))) and do (Actions)
    • Loop - Actions
      • Unit - Cause (Attacking unit) to damage (Picked unit), dealing Pulverize_Damage damage of attack type Spells and damage type Normal
Ofcourse all the (Attacking unit) has to be replaced with given system's damage source reference.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Oh.. the set bj_wantDestroyGroup = true is placed before, and not after the group is created? :p

Is there a way to detect if the group was really destroyed? I've had some issues with the bj_wantDestroyGroup not working the same way as storing the group into a variable =/

EDIT: GDD added :). Removed Temp_Group and added the pick conditions in the group creation.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
@Bribe: 'Lead me to the truth' if i'm wrong, but if GDD_DamageEvent and GDD_Damage not equal to 0, how could a '0 dmg' trigger it?.

I was using dummy Unholy Frenzy with 0 hp cost for something, and the unit was triggering. When changed to 'Not equal to 0' it began to work properly... Anyway, I'll keep testing and doing stuff. If it messes stuff, i'll use yours ;)
 
Status
Not open for further replies.
Top