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

[Questions]A lot of them

Status
Not open for further replies.
Level 11
Joined
Aug 1, 2009
Messages
714
I only ask a lot of questions so that I can create a Formula.

#1: How could I check in a condition the damage type that dealt in a unit...
  • Bleeding Sword Effect
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamageSource has an item of type Bleeding Sword) Equal to True
      • (GDD_DamagedUnit is A structure) Equal to False
      • GDD_Damage Greater than or equal to 0.01
    • Actions
      • Trigger - Turn off (This trigger)
      • Set BleedSword_DamageSMaxLife = (Max life of GDD_DamagedUnit)
      • Set BleedSword_DamageSMaxLifeDealt = (BleedSword_DamageSMaxLife x 0.04)
      • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing BleedSword_DamageSMaxLifeDealt damage of attack type Hero and damage type Normal
      • Set BleedSword_Point = (Position of GDD_DamageSource)
      • Unit - Create 1 Dummy Unit - Speller for (Owner of GDD_DamageSource) at BleedSword_Point facing Default building facing degrees
      • Unit - Add Unit Attachment (Ability) - Bleeding Sword to (Last created unit)
      • Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Cyclone GDD_DamagedUnit
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_BleedSword_Point)
      • Trigger - Turn on (This trigger)
In the above trigger I wanted to add a condition of
  • Damage Type is Magic Equal to False
Something like that

#2: Will this leak?
  • Bleeding Sword Add Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has an item of type Bleeding Sword) Equal to True
      • ((Attacking unit) is in BleedingSword_Group) Equal to False
    • Actions
      • Unit Group - Add (Attacking unit) to BleedingSword_Group
  • Bleeding Sword Effect
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamageSource has an item of type Bleeding Sword) Equal to True
      • (GDD_DamagedUnit is A structure) Equal to False
      • (GDD_DamageSource is in BleedingSword_Group) Equal to True
      • GDD_Damage Greater than or equal to 0.01
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit Group - Remove GDD_DamageSource from BleedingSword_Group
      • Set BleedSword_DamageSMaxLife = (Max life of GDD_DamagedUnit)
      • Set BleedSword_DamageSMaxLifeDealt = (BleedSword_DamageSMaxLife x 0.04)
      • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing BleedSword_DamageSMaxLifeDealt damage of attack type Hero and damage type Normal
      • Set BleedSword_Point = (Position of GDD_DamageSource)
      • Unit - Create 1 Dummy Unit - Speller for (Owner of GDD_DamageSource) at BleedSword_Point facing Default building facing degrees
      • Unit - Add Unit Attachment (Ability) - Bleeding Sword to (Last created unit)
      • Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Cyclone GDD_DamagedUnit
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_BleedSword_Point)
      • Trigger - Turn on (This trigger)
I wanted to register a unit when he attacks an enemy unit with Bleeding sword then unregister when he deal the damage... I use this idea since if I use a storm bolt to the enemy with a Bleeding Sword, then the effect of the sword will activate.
 
If you trigger all spell-related damage, you can add a boolean
right before you deal the damage like this:

  • Details
    • Events
    • Conditions
    • Actions
      • Set TriggeredDamage = true
      • Unit - Cause ...
Then from the damage detection trigger, reset the boolean to false.

Whenever the damage is dealt and that boolean is false, that means
it was a physical attack.
 
Level 11
Joined
Aug 1, 2009
Messages
714
If you trigger all spell-related damage, you can add a boolean
right before you deal the damage like this:

  • Details
    • Events
    • Conditions
    • Actions
      • Set TriggeredDamage = true
      • Unit - Cause ...
Then from the damage detection trigger, reset the boolean to false.

Whenever the damage is dealt and that boolean is false, that means
it was a physical attack.

Thanks but NOT ALL will be triggered-based damage.
Grrrr.... Hmmm... I think I got an idea on my second question...
Thanks for the help
 
Status
Not open for further replies.
Top