GUI-Friendly Damage Detection v1.2.1

GUI-Friendly Damage Detection
by Weep
Version 1.2.1

-- General Information --
This system provides a leak-free, GUI-friendly implementation of an "any unit takes damage" event. It requires no JASS knowledge to use, nor any other systems, nor any software other than the World Editor. It will not interfere with other systems, either.

It uses the Game - Value Of Real Variable event as its method of activating other triggers, and passes the event responses through a few globals.

Before you copy triggers that use GDD into a new map, you need to copy over GDD with its GDD Variable Creator trigger, or the variables won't be automatically created correctly.
If you pasted GDD-using triggers before pasting GDD, to fix it, change the type of the variable GDD_Event to be a Real in the Trigger Editor's Variables window, and then find the triggers that became disabled and change their event to use the variable GDD_Event.


-- How To Implement --
  1. Be sure "Automatically create unknown variables while pasting trigger data" is enabled in the World Editor general preferences.
  2. Copy the trigger category "GDD" from the demo map and paste it into your map. (Alternately: create the variables listed in the globals block below, create a trigger named GUI Friendly Damage Detection", and paste in this entire text.)
  3. Create your damage triggers using Game - Value Of Real Variable, select GDD_Event as the variable, and leave the rest of the settings to the default "becomes Equal to 0.00".
The event responses are the following variables:
  • GDD_Damage is the amount of damage, replacing Event Response - Damage Taken.
  • GDD_DamagedUnit is the damaged unit, replacing Event Response - Triggering Unit.
    • However, Triggering Unit can still be used, if you need to use waits. Read the Notes section below for more info.
  • GDD_DamageSource is the damaging unit, replacing Event Response - Damage Source.

-- Example Usage --
  • Display Damage
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • Game - Display to (All players) for 1.00 seconds the text: ((((Name of GDD_DamageSource) + damaged ) + (Name of GDD_DamagedUnit)) + ( for + ((String(GDD_Damage)) + damage.)))
-- System Code --
JASS:
// GUI-Friendly Damage Detection -- v1.2.1 -- by Weep
//    http://www.thehelper.net/forums/showthread.php?t=137957
//
//    Requires: only this trigger and its variables.
//
// -- What? --
//    This system provides a leak-free, GUI-friendly implementation of an "any unit takes
//    damage" event.  It requires no JASS knowledge to use.
//
//    It uses the Game - Value Of Real Variable event as its method of activating other
//    triggers, and passes the event responses through a few globals.
//
// -- Why? --
//    The traditional GUI method of setting up a trigger than runs when any unit is damaged
//    leaks trigger events.  This system is easy to implement and removes the need to do
//    you own GUI damage detection setup.
//
// -- How To Implement --
//    0. Before you copy triggers that use GDD into a new map, you need to copy over GDD
//       with its GDD Variable Creator trigger, or there will be a problem: the variables
//       won't be automatically created correctly.
//
//    1. Be sure "Automatically create unknown variables while pasting trigger data" is
//       enabled in the World Editor general preferences.
//    2. Copy this trigger category ("GDD") and paste it into your map.
//       (Alternately: create the variables listed in the globals block below, create a
//       trigger named "GUI Friendly Damage Detection", and paste in this entire text.)
//    3. Create your damage triggers using Game - Value Of Real Variable as the event,
//       select GDD_Event as the variable, and leave the rest of the settings to the default
//       "becomes Equal to 0.00".
//       The event responses are the following variables:
//          GDD_Damage is the amount of damage, replacing Event Response - Damage Taken.
//          GDD_DamagedUnit is the damaged unit, replacing Event Response - Triggering Unit.
//              Triggering Unit may still be used, if you need to use waits.
//              Read the -- Notes -- section below for more info.
//          GDD_DamageSource is the damaging unit, replacing Event Response - Damage Source.
//
// -- Notes --
//    GDD's event response variables are not wait-safe; you can't use them after a wait in
//    a trigger.  If you need to use waits, Triggering Unit (a.k.a. GetTriggerUnit()) can
//    be used in place of GDD_DamageSource.  There is no usable wait-safe equivalent to
//    Event Damage or Damage Source; you'll need to save the values yourself.
//
//    Don't write any values to the variables used as the event responses, or it will mess
//    up any other triggers using this system for their triggering.  Only use their values.
//
//    This uses arrays, so can detect damage for a maximum of 8190 units at a time, and
//    cleans up data at a rate of 33.33 per second, by default.  This should be enough for
//    most maps, but if you want to change the rate, change the value returned in the
//    GDD_RecycleRate function at the top of the code, below.
//
//    By default, GDD will not register units that have Locust at the moment of their
//    entering the game, and will not recognize when they take damage (which can only
//    happen if the Locust ability is later removed from the unit.)  To allow a unit to have
//    Locust yet still cause GDD damage events if Locust is removed, you can either design
//    the unit to not have Locust by default and add it via triggers after creation, or
//    edit the GDD_Filter function at the top of the code, below.
//
// -- Credits --
//    Captain Griffin on triggerc.net for the research and concept of GroupRefresh.
//
//    Credit in your map not needed, but please include this README.
//
// -- Version History --
//    1.2.1: Minor code cleaning.  Added configuration functions.  Updated documentation.
//    1.2.0: Made this system work properly with recursive damage.
//    1.1.1: Added a check in order to not index units with the Locust ability (dummy units).
//           If you wish to check for damage taken by a unit that is unselectable, do not
//           give the unit-type Locust in the object editor; instead, add the Locust ability
//           'Aloc' via a trigger after its creation, then remove it.
//    1.1.0: Added a check in case a unit gets moved out of the map and back.
//    1.0.0: First release.


//===================================================================
// Configurables.
function GDD_RecycleRate takes nothing returns real //The rate at which the system checks units to see if they've been removed from the game
    return 0.03
endfunction

function GDD_Filter takes unit u returns boolean //The condition a unit has to pass to have it registered for damage detection
    return GetUnitAbilityLevel(u, 'Aloc') == 0 //By default, the system ignores Locust units, because they normally can't take damage anyway
endfunction

//===================================================================
// This is just for reference.
// If you use JassHelper, you could uncomment this section instead of creating the variables in the trigger editor.

// globals
//  real udg_GDD_Event = 0.
//  real udg_GDD_Damage = 0.
//  unit udg_GDD_DamagedUnit
//  unit udg_GDD_DamageSource
//  trigger array udg_GDD__TriggerArray
//  integer array udg_GDD__Integers
//  unit array udg_GDD__UnitArray
//  group udg_GDD__LeftMapGroup = CreateGroup()
// endglobals

//===================================================================
// System code follows.  Don't touch!
function GDD_Event takes nothing returns boolean
    local unit damagedcache = udg_GDD_DamagedUnit
    local unit damagingcache = udg_GDD_DamageSource
    local real damagecache = udg_GDD_Damage
    set udg_GDD_DamagedUnit = GetTriggerUnit()
    set udg_GDD_DamageSource = GetEventDamageSource()
    set udg_GDD_Damage = GetEventDamage()
    set udg_GDD_Event = 1.
    set udg_GDD_Event = 0.
    set udg_GDD_DamagedUnit = damagedcache
    set udg_GDD_DamageSource = damagingcache
    set udg_GDD_Damage = damagecache
    set damagedcache = null
    set damagingcache = null
    return false
endfunction

function GDD_AddDetection takes nothing returns boolean
//  if(udg_GDD__Integers[0] > 8190) then
//      call BJDebugMsg("GDD: Too many damage events!  Decrease number of units present in the map or increase recycle rate.")
//      ***Recycle rate is specified in the GDD_RecycleRate function at the top of the code.  Smaller is faster.***
//      return
//  endif
    if(IsUnitInGroup(GetFilterUnit(), udg_GDD__LeftMapGroup)) then
        call GroupRemoveUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
    elseif(GDD_Filter(GetFilterUnit())) then
        set udg_GDD__Integers[0] = udg_GDD__Integers[0]+1
        set udg_GDD__UnitArray[udg_GDD__Integers[0]] = GetFilterUnit()
        set udg_GDD__TriggerArray[udg_GDD__Integers[0]] = CreateTrigger()
        call TriggerRegisterUnitEvent(udg_GDD__TriggerArray[udg_GDD__Integers[0]], udg_GDD__UnitArray[udg_GDD__Integers[0]], EVENT_UNIT_DAMAGED)
        call TriggerAddCondition(udg_GDD__TriggerArray[udg_GDD__Integers[0]], Condition(function GDD_Event))
    endif
    return false
endfunction

function GDD_PreplacedDetection takes nothing returns nothing
    local group g = CreateGroup()
    local integer i = 0
    loop
        call GroupEnumUnitsOfPlayer(g, Player(i), Condition(function GDD_AddDetection))
        set i = i+1
        exitwhen i == bj_MAX_PLAYER_SLOTS
    endloop
    call DestroyGroup(g)
    set g = null
endfunction

function GDD_GroupRefresh takes nothing returns nothing
// Based on GroupRefresh by Captain Griffen on triggerc.net
    if (bj_slotControlUsed[5063] == true) then
        call GroupClear(udg_GDD__LeftMapGroup)
        set bj_slotControlUsed[5063] = false
    endif
    call GroupAddUnit(udg_GDD__LeftMapGroup, GetEnumUnit())
endfunction

function GDD_Recycle takes nothing returns nothing
    if(udg_GDD__Integers[0] <= 0) then
        return
    elseif(udg_GDD__Integers[1] <= 0) then
        set udg_GDD__Integers[1] = udg_GDD__Integers[0]
    endif
    if(GetUnitTypeId(udg_GDD__UnitArray[udg_GDD__Integers[1]]) == 0) then
        call DestroyTrigger(udg_GDD__TriggerArray[udg_GDD__Integers[1]])
        set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = null
        set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = udg_GDD__TriggerArray[udg_GDD__Integers[0]]
        set udg_GDD__UnitArray[udg_GDD__Integers[1]] = udg_GDD__UnitArray[udg_GDD__Integers[0]]
        set udg_GDD__UnitArray[udg_GDD__Integers[0]] = null
        set udg_GDD__Integers[0] = udg_GDD__Integers[0]-1
    endif
    set udg_GDD__Integers[1] = udg_GDD__Integers[1]-1
endfunction

function GDD_LeaveMap takes nothing returns boolean
    local boolean cached = bj_slotControlUsed[5063]
    if(udg_GDD__Integers[2] < 64) then
        set udg_GDD__Integers[2] = udg_GDD__Integers[2]+1
    else
        set bj_slotControlUsed[5063] = true
        call ForGroup(udg_GDD__LeftMapGroup, function GDD_GroupRefresh)
        set udg_GDD__Integers[2] = 0
    endif
    call GroupAddUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
    set bj_slotControlUsed[5063] = cached
    return false
endfunction

// ===========================================================================
function InitTrig_GUI_Friendly_Damage_Detection takes nothing returns nothing
    local region r = CreateRegion()
    call RegionAddRect(r, GetWorldBounds())
    call TriggerRegisterEnterRegion(CreateTrigger(), r, Condition(function GDD_AddDetection))
    call TriggerRegisterLeaveRegion(CreateTrigger(), r, Condition(function GDD_LeaveMap))
    call GDD_PreplacedDetection()
    call TimerStart(CreateTimer(), GDD_RecycleRate(), true, function GDD_Recycle)
    set r = null
endfunction

-- Notes --
GDD's event response variables are not wait-safe; you can't use them after a wait in a trigger. If you need to use waits, Triggering Unit (a.k.a. GetTriggerUnit()) can be used in place of GDD_DamageSource. There is no usable wait-safe equivalent to GDD_Damage or GDD_DamageSource; you'll need to save the values yourself.

A common problem when using any damage detection system occurs when you try to cause the damage source to damage the damaged unit from a damage event - for example, if triggering bonus damage. This causes the unit to repeatedly damage the target, because dealing damage in the trigger causes that trigger to run again, and again in turn, infinitely. One solution is to add the action Turn off (This trigger) before dealing damage and add the action Turn on (This trigger) afterward.

Don't write any values to the variables used as the event responses, or it will mess up any other triggers using this system for their triggering. Only use their values.

This uses arrays, so can detect damage for a maximum of 8190 units at a time, and cleans up data at a rate of 33.33 per second, by default. This should be enough for most maps, but if you want to change the rate, change the value returned in the GDD_RecycleRate function at the top of the code.

By default, GDD will not register units that have Locust at the moment of their entering the game, and will not recognize when they take damage (which can only happen if the Locust ability is later removed from the unit.) To allow a unit to have Locust yet still cause GDD damage events if Locust is removed, you can either design the unit to not have Locust by default and add it via triggers after creation, or edit the GDD_Filter function at the top of the code.

-- Credits --
Captain Griffin on triggerc.net for the research and concept of GroupRefresh.

Credit in your map not needed, but please include the README.

-- Version History --
1.2.1: Minor code cleaning. Added configuration functions. Updated documentation.
1.2.0: Made this system work properly with recursive damage.
1.1.1: Added a check in order to not index units with the Locust ability (dummy units). If you wish to check for damage taken by a unit that is unselectable, do not give the unit-type Locust in the object editor; instead, add the Locust ability 'Aloc' via a trigger after its creation, then remove it.
1.1.0: Added a check in case a unit gets moved out of the map and back.
1.0.0: First release.


Keywords:
gui, friendly, damage, detection, detect
Contents

GUI-Friendly Damage Detection (Map)

Reviews
17:29, 16th Jan 2010 TriggerHappy: Very easy to use for GUI users and a fairly unique implementation.

Moderator

M

Moderator

17:29, 16th Jan 2010
TriggerHappy:

Very easy to use for GUI users and a fairly unique implementation.
 
So this creates a trigger for ever unit entering the map?
You could use hashtables and such to make it full MUI (endless indexing).

Anway, pretty cool I must say. There are a plenty of other DD systems around but yours is so far I can see one of the most GUI friendly ones. But that also decreases functionality.

So for easy stuff, this is good enough.
 
Level 10
Joined
Jul 12, 2009
Messages
321
So this creates a trigger for ever unit entering the map?
Yes. This allows the triggers' subsequent removal, in contrast to the traditional GUI technique of setting up damage detection, where you simply keep adding on damage events to one trigger which cannot be cleared in a practical fashion, causing an (admittedly minor) leak.

You could use hashtables and such to make it full MUI (endless indexing).
I could, but I wanted this to be as compatible as possible. It'll work pre-1.24, and more importantly, because it doesn't require any 1.24 features nor any compiler other than the WE default, it can be used in any platform's World Editor.

But that also decreases functionality. So for easy stuff, this is good enough.
Yes, and it'll also co-exist happily with any other system. Flexibility and compatibility were among my main goals. Also, it takes care of double-registration protection (if a unit exits and re-enters the map) for you, and handles recursive damage.

Get rid of the 000 by converting to integer
That's not part of the system, just part of the quick demonstration of how to use it. It's unimportant.
 
Level 10
Joined
Feb 7, 2005
Messages
409
you really should use vJass

Why?

JNGP has a lot of problems with patch 1.24, for example if you use it you won't be able to use GUI Hashtables. Which means if you only want one of these VJass systems you'll need to make anything requiring a hashtable VJass as well.

Also, the name of this system specifically states "GUI-Friendly" and if it used VJass it'd destroy some GUI functions, like I just stated, and that's not very friendly.

-Teld
 
Level 10
Joined
Jul 12, 2009
Messages
321
(despite there are 8 like this)
I hadn't found any that are intended for easy use with GUI. Have any links?

You should use Floating Texts instead of Game - Display to all.
And the texts to be shown above damage delear's head.
Again it seems I'm betrayed by my screenshot, because you've completely missed the purpose of this...

The text is not part of this system! It is only there as a demonstration of its use. The underlying code is meant to be a system used for other purposes, whether it is displaying damage in-game or building triggered spells. I suppose the first sentence of the resource description wasn't clear enough, either. :facepalm:
 
Level 10
Joined
Jul 12, 2009
Messages
321
I have a question, how bad is the RegisterEvent leak?
Are you talking about the event leak incurred via the traditional way of setting up damage detection in the GUI? Unsure - estimates seem to vary between negligible, and ~400 bytes... Still, it's the principle of it - avoiding leaks when possible - plus this centralizes damage detection rather than registering events repeatedly for every spell that uses damage detection.

btw, can this be used to make a custom damage system?
I suppose so.
 
Level 10
Joined
Jul 12, 2009
Messages
321
And that for every library that uses the RegisterDamageEvent method.
I'm confused. Are you talking about any system that uses damage events? It's my understanding (from discussion on TheHelper.net) that events are cleared (do not leak) if the trigger to which they are attached is destroyed, and the same with trigger conditions. Only trigger actions leak if not also destroyed with the trigger. This system destroys its triggers when the unit is no longer present on the map.

This system was designed to avoid the buildup of leaked trigger events that occurs with GUI-only damage detection.
 
Level 10
Joined
Jul 12, 2009
Messages
321
icepig01 found something I needed to make note of. The variable event itself is not sufficient for the World Editor to correctly create the variables automatically - it won't create GDD_Event as a Real. Before copying triggers that use GDD into a new map, you'll need to copy GDD and its variable creator trigger. If you already did, edit the variable GDD_Event to be a Real, then fix the events for whichever triggers become disabled. I've updated the first post and readme in the attached demo map to mention this.
 
Level 9
Joined
Oct 11, 2009
Messages
477
I hadn't found any that are intended for easy use with GUI. Have any links?


Again it seems I'm betrayed by my screenshot, because you've completely missed the purpose of this...

The text is not part of this system! It is only there as a demonstration of its use. The underlying code is meant to be a system used for other purposes, whether it is displaying damage in-game or building triggered spells. I suppose the first sentence of the resource description wasn't clear enough, either. :facepalm:


Yeah, Weep is right, you can change the Game-text action in anyway you want. Choose to use the action or change it. And I've noticed that Weep created the Game-text trigger for the system users to know what event it will respond to.
 
Level 4
Joined
Jan 19, 2008
Messages
69
Great system, but I'm having an issue. I'm using the system for a passive ability causing the attacker (the damage source) to deal extra damage against the target, this seems to create an infinite loop and massive lag. Is there a way to fix this?

Edit: I've also encountered another problem, when my hero uses an ability (shockwave for an instance) the ability also causes extra damage. My point is: Is there a way to make the extra damage occur ONLY on melee attacks?
 
Last edited:
Level 10
Joined
Jul 12, 2009
Messages
321
Great system, but I'm having an issue. I'm using the system for a passive ability causing the attacker (the damage source) to deal extra damage against the target, this seems to create an infinite loop and massive lag. Is there a way to fix this?
As I wrote in the system description:
Weep said:
A common problem when using any damage detection system occurs when you try to cause the damage source to damage the damaged unit from a damage event - for example, if triggering bonus damage. This causes the unit to repeatedly damage the target, because dealing damage in the trigger causes that trigger to run again, and again in turn, infinitely. One solution is to add the action Turn off (This trigger) before dealing damage and add the action Turn on (This trigger) afterward.

Edit: I've also encountered another problem, when my hero uses an ability (shockwave for an instance) the ability also causes extra damage. My point is: Is there a way to make the extra damage occur ONLY on melee attacks?
The inability to distinguish between damage types is common to all damage detection systems. One common solution is to give the attacker a buff-placing ability like Frost Attack, which allows you to detect for the presence of a unique buff in order to tell if damage is from an attack (and, of course, remove the buff in that trigger). Note that this precludes the option for the unit to have other buff-placing abilities, eg. from items.

The other common solution is to trigger all spell damage dealt in your map, thus allowing you to determine when damage is from an attack because it'll be the only damage that does not originate from a trigger. (Systems which offer damage type detection tend to require you to craft your map in this manner, using special damage functions that are integrated into the system.)
 
Level 3
Joined
Mar 3, 2009
Messages
34
At first: really great job, man! I mplemented your system and it really works well ;) - but i suppose, it is not meant to distinguish between damage dealt by a unit, damage dealt by a spell and some kind of triggered damage, am i right?
 
System is really good but not solves my problems. This trigger works with spells (example immolation) and it causes many bugs in my map.

Is there a way making this ONLY NORMAL ATTACK ?

when using DDS its advisable to trigger every damage so that you can easily filter it out... example make each damage that should not be detected by the system to be dealt by a dummy unit...
 
Level 3
Joined
Aug 20, 2010
Messages
71
Heres what happens when sb casts a spell based on poison arrows etc or anyway both normal and magic damage is being dealt by the same source, then warcraft 3 will close.
can you make only physical damage to be included
anyway can you fix this?
 
Level 10
Joined
Jul 12, 2009
Messages
321
Heres what happens when sb casts a spell based on poison arrows etc or anyway both normal and magic damage is being dealt by the same source, then warcraft 3 will close.
I've never experienced this unless a separate trigger that uses GDD is misbehaving. Can you post an example map?

can you make only physical damage to be included
There are ways a mapper can set up their map so they can be detected separately, but this system is merely a GUI-friendly interface for the basic damage detection in Warcraft 3, which detects all types of damage equally. :csad:
 
Level 10
Joined
Jul 12, 2009
Messages
321
Here is the spell

Yes, indeed your trigger has a problem. I've even advised a very simple way how to avoid it in the original post about GDD:
Weep said:
A common problem when using any damage detection system occurs when you try to cause the damage source to damage the damaged unit from a damage event - for example, if triggering bonus damage. This causes the unit to repeatedly damage the target, because dealing damage in the trigger causes that trigger to run again, and again in turn, infinitely. One solution is to add the action Turn off (This trigger) before dealing damage and add the action Turn on (This trigger) afterward.
 
Level 1
Joined
Jun 17, 2011
Messages
2
I'm a newbie here. I am experiencing lags in my map. Could these GDD triggers caused it? Also, does checking buff when using the event "a unit is attacked" removes the ability of players to spam S in order to trigger "unit - damage" immediately?
 
Level 1
Joined
Jun 17, 2011
Messages
2
"-->Unit is attacked do not trigger Unit is damaged as they are two different events...

What I mean is:

Event
A unit is attacked.
Condition
Attacked unit has buff equal to true
Action
unit - Damage attacked unit

If i spam Stop before the attack deals damage, will it trigger the action?
 
It will only take effect if the unit has the buff... though if you spam the Stop command, the trigger will still be run up to the condition so it will still take some processing power...

about the lag, you can try turning off the GDD to see if it still lags... though for me, I haven't experienced lag when using a DDS... it might be the actions that you run when the damage is detected which may be causing lag...
 
Level 12
Joined
Nov 20, 2007
Messages
660
got a problem here
  • Rage Damage
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GDD_DamageSource has buff Rage (Buff)) Equal to True
        • Then - Actions
          • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing GDD_Damage damage of attack type Spells and damage type Normal
        • Else - Actions
When the unit with rage buff deals damage the game turns off
 
Level 11
Joined
Aug 1, 2009
Messages
714
I use GDD. and this is my triggers
  • Trigger Storm Bolt Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt - First Skill
    • Actions
      • Set Unit_Stormbolt_Caster = (Triggering unit)
      • Set Point_Caster_StormBolt = (Position of Unit_Stormbolt_Caster)
      • Unit - Create 1 Dummy Unit - Storm Bolt for (Owner of Unit_Stormbolt_Caster) at Point_Caster_StormBolt facing Default building facing degrees
      • Hero - Modify Strength of (Last created unit): Set to (Strength of Unit_Stormbolt_Caster (Include bonuses))
      • Hero - Modify Agility of (Last created unit): Set to (Agility of Unit_Stormbolt_Caster (Include bonuses))
      • Hero - Modify Intelligence of (Last created unit): Set to (Intelligence of Unit_Stormbolt_Caster (Include bonuses))
      • Unit - Set level of Dummy Unit Ability - Storm Bolt for (Last created unit) to (Level of Storm Bolt - First Skill for Unit_Stormbolt_Caster)
      • Unit - Order (Last created unit) to Attack (Target unit of ability being cast)
      • Unit Group - Add (Last created unit) to Unit_Group_Stormbolt
      • Custom script: call RemoveLocation (udg_Point_Caster_StormBolt)
  • Trigger Storm Bolt Damage
    • Events
      • Game - GDD_Damage becomes Equal to 0.00
    • Conditions
      • (GDD_DamageSource is in Unit_Group_Stormbolt) Equal to True
    • Actions
      • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (((75.00 x (Real((Level of Dummy Unit Ability - Storm Bolt for GDD_DamageSource)))) + ((Real((Strength of GDD_DamageSource (Include bonuses)))) x 0.75)) - GDD_Damage) damage of attack type Spells and damage type Normal
      • Unit - Add a 0.50 second Generic expiration timer to GDD_DamageSource
this don't work!
 
Level 12
Joined
Nov 20, 2007
Messages
660
Turn off
  • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (((75.00 x (Real((Level of Dummy Unit Ability - Storm Bolt for GDD_DamageSource)))) + ((Real((Strength of GDD_DamageSource (Include bonuses)))) x 0.75)) - GDD_Damage) damage of attack type Spells and damage type Normal
    • Unit - Add a 0.50 second Generic expiration timer to GDD_DamageSource
Turn on

Doesn't work ? o_O
 
Top