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

BJ Damage Target Fails?

Status
Not open for further replies.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Ability being cast) Equal to Storm Call
    • Then - Actions
      • Custom script: set udg_TempCaster = GetTriggerUnit()
      • Custom script: set udg_TempPlayer = GetOwningPlayer(udg_TempCaster)
      • Set TempPoint = (Target point of ability being cast)
      • Set TempInteger = (Level of (Ability being cast) for TempCaster)
      • Set TempReal = ((100.00 + (50.00 x (Real(TempInteger)))) + ((Real((Intelligence of TempCaster (Include bonuses)))) x 2.00))
      • Set TempGroup = (Units within 350.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of TempPlayer) Equal to True) and (((Matching unit) is in StructGroup) Equal to False))))
      • Unit - Create 1 Lightning for TempPlayer at TempPoint facing Default building facing degrees
      • Unit - Add a 0.60 second Generic expiration timer to (Last created unit)
      • Animation - Change (Last created unit)'s size to (70.00%, 100.00%, 100.00%) of its original size
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Custom script: call UnitDamageTarget(udg_TempCaster, GetEnumUnit(), udg_TempReal, true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_LIGHTNING, WEAPON_TYPE_WHOKNOWS)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: set udg_TempCaster = null
      • Custom script: set udg_TempPlayer = null
    • Else - Actions
That is an example. It sometimes only picks one unit.
There are also several other group picks that fail. :goblin_boom:

E: This was made very long ago so about the TempPlayer setting to TriggerPlayer and other coding flaws, I will fix them soon.
 
Debug message name of all units in range 350, then after each condition make again debug message, so maybe you can see where the problem is.

Maybe it doesnt even count the units you want to have in group.

  • Unit Group - Pick every unit in range of 350
    • Game - Display Text: ************
    • Game - Display Text: Name of Picked Unit
    • If Picked Unit is alive == true
      • Game - Display Text: Bool 1 == true
      • If Picked Unitt is enemy == true
        • Game - Display Text: Bool 2 == true
        • If Picked Unitt is StructGroup == false
          • Game - Display Text: Bool 3 == true
          • Game - Display Text: NameOfPicked unit + has been added succefully
You can try it, maybe it helps ya :wink:
 
It is the damage target. Why? As said in the screenshot, everyone passed the last check(not in StructGroup), meaning they should be damaged because the StructGroup debug message was right before the damage line.

The Wrath is the giant one, the Wraiths are the miniatures and the banshees are the banshees. A banshee died on the first spell cast, though everyone passed the check.

'thedudeabides', second cast, the same thing happened.
 

Attachments

  • Test.png
    Test.png
    294.8 KB · Views: 146
No. It's not only them, though. In a looping spell, I have a DPS on enemies around the caster. But it does the same and damages only one unit, and leaves everything else.

I don't think it's magic immunity since damage can happen on any unit, but it only depends if it's the first thing the group pick.. picked.
 
Level 8
Joined
Sep 7, 2008
Messages
320
It is the damage target. Why? As said in the screenshot, everyone passed the last check(not in StructGroup), meaning they should be damaged because the StructGroup debug message was right before the damage line.

The Wrath is the giant one, the Wraiths are the miniatures and the banshees are the banshees. A banshee died on the first spell cast, though everyone passed the check.

'thedudeabides', second cast, the same thing happened.

DAMAGE_TYPE_LIGHTNING <---- this
Damage type means "in special condition, the damage wont hurt enemy".
By default, invulnerable status will block all damage but in the game code, DAMAGE_TYPE_UNIVERSAL can pass invulnerable

In this case, i believe lightning damage cant hurt the giant
 
Status
Not open for further replies.
Top