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

How to detect when an orb effect is active

Status
Not open for further replies.
SOLVED
  • Untitled Trigger 002
    • Events
    • Conditions
      • ((Triggering unit) has buff Cold Arrows (Stacking)) Equal to True
      • (Level of Cold Arrows for (Damage source)) Not equal to 0
      • ((Damage source) is A Hero) Equal to True
    • Actions
      • Set p = (Position of (Triggering unit))
      • Set A = (Player number of (Owner of (Damage source)))
      • Set Integer = (Intelligence of (Damage source) (Include bonuses))
      • Set real = (Real(Integer))
      • Set Integer = (Level of Cold Arrows for (Damage source))
      • Set real = (real x (0.20 + (0.10 x (Real(Integer)))))
      • Set unit = (Triggering unit)
      • Floating Text - Create floating text that reads (String((Integer(real)))) at p with Z offset -50.00, using font size 10.00, color (10.00%, 10.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 50.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
      • Custom script: call RemoveLocation (udg_p)
      • Unit - Remove Cold Arrows (Stacking) buff from (Triggering unit)
      • Unit - Cause (Damage source) to damage unit, dealing real damage of attack type Spells and damage type Normal
      • Custom script: call DestroyGroup(udg_ug)
 
Last edited:
Level 11
Joined
Mar 18, 2009
Messages
788
Well, if the orb ability applies a buff its possible to detect it with GUI. (Not a hidden trigger buff)

Otherwise its done with JASS as all abilities and systems are made in DotA. I suggest you look through JASS threads if there is something similar.

EDIT: There is also a very simple way to do it with GUI but its not the same as Right-Click = on, Right-Click Again = off Left-Click = Target.

It uses the Immolate Principe.
 
Last edited:
Well, if the orb ability applies a buff its possible to detect it with GUI. (Not a hidden trigger buff)

Otherwise its done with JASS as all abilities and systems are made in DotA. I suggest you look through JASS threads if there is something similar.

EDIT: There is also a very simple way to do it with GUI but its not the same as Right-Click = on, Right-Click Again = off Left-Click = Target.

It uses the Immolate Principe.

"global unit takes damage"
condition it has a buff
condition owner of damage sorce equall to :ogre_rage: owner of ogre hero
remove the buff
make damge equall to the ogre :ogre_rage: stranght

something like this?
but wouldnt this make imba lag?
  • Untitled Trigger 002
    • Events
    • Conditions
      • ((Triggering unit) has buff Cold Arrows (Stacking)) Equal to True
      • (Level of Cold Arrows for (Damage source)) Not equal to 0
      • ((Damage source) is A Hero) Equal to True
    • Actions
      • Set p = (Position of (Triggering unit))
      • Set A = (Player number of (Owner of (Damage source)))
      • Set Integer = (Intelligence of (Damage source) (Include bonuses))
      • Set real = (Real(Integer))
      • Set Integer = (Level of Cold Arrows for (Damage source))
      • Set real = (real x (0.20 + (0.10 x (Real(Integer)))))
      • Floating Text - Create floating text that reads (String((Integer(real)))) at p with Z offset -50.00, using font size 10.00, color (10.00%, 10.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 50.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
      • Custom script: call RemoveLocation (udg_p)
      • Unit - Cause (Damage source) to damage (Triggering unit), dealing real damage of attack type Spells and damage type Normal
      • Unit - Remove Cold Arrows (Stacking) buff from (Triggering unit)
      • Custom script: call DestroyGroup(udg_ug)
  • Untitled Trigger 003
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Entering unit) is Magic Immune) Equal to False
    • Actions
      • Trigger - Add to Untitled Trigger 002 <gen> the event (Unit - (Entering unit) Takes damage)
This skill do not damage the target instead it makes error that crush the game // removing the "unit - damage unit" will cause the game to go on normaly but the damage ofcourse wont be applied
 
Last edited:
Level 8
Joined
Jan 8, 2010
Messages
493
instead of registering multiple units (like you do in your trigger), use a damage detection system. Bribe's Damage Engine or Weep's GDD are both GUI-friendly damage detection systems.

i have no experience using Bribe's, 'cause all i have done in the past is use Weep's, so this would be the trigger:
  • Events
    • Game - GDD_DamageEvent becomes 0.00
  • Conditions
    • GDD_DamagedUnit has buff YourBuff Equal to true
    • (Level of Skill for GDD_DamageSource) Greater than 0
  • Actions
    • ...
check for Bribe's 'cause it seem to have the ability to use Unit - Damage Target action, as using that Action in the above trigger will cause a damage loop and will crash the game (it happened to me :p)
 
instead of registering multiple units (like you do in your trigger), use a damage detection system. Bribe's Damage Engine or Weep's GDD are both GUI-friendly damage detection systems.

i have no experience using Bribe's, 'cause all i have done in the past is use Weep's, so this would be the trigger:
  • Events
    • Game - GDD_DamageEvent becomes 0.00
  • Conditions
    • GDD_DamagedUnit has buff YourBuff Equal to true
    • (Level of Skill for GDD_DamageSource) Greater than 0
  • Actions
    • ...
check for Bribe's 'cause it seem to have the ability to use Unit - Damage Target action, as using that Action in the above trigger will cause a damage loop and will crash the game (it happened to me :p)
Na, there was a bug where the damage unit was damaging the target , the trigger took effect, and instead of remove and only then make the damage - it made the trigger reactive himself making an endless loop of "unit took damage while having the buff"
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Every ability has its own Order ID, in this case...
The Order IDs of Cold Arrows are:
coldarrows (activation)
uncoldarrows (unactivation)


To catch these ID for each ability, use this trigger:
  • ID Catch
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Issued order)))
So, if you want to do something, when Cold Arrows is activated, do this:
  • Activation
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (Order(coldarrows))
    • Actions
      • Game - Display to (All players) the text: (String((Issued order)))
      • -------- DO ACTIONS HERE --------
You could set for each of the String Order ID in a variable, at the start of the game first.
 
Status
Not open for further replies.
Top