Damage random unit by an aura

EoW.chips

New Member
Reaction score
2
Hey,
i made an spell, based of an aura. The spell is like that: It damages a random enemy unit every 2.5 seconds in a range of 700.
I tried to trigger it but it kinda doesnt work.

Here is the trigger:
Trigger:
  • Electric touch
    • Ereignisse
      • Zeit - Every 2.50 seconds of game time
    • Bedingungen
    • Aktionen
      • Spielergruppe - Pick every player in Humans and do (Actions)
        • Schleifen - Aktionen
          • Einheitengruppe - Pick every unit in (Units of type Lord of lightning) and do (Actions)
            • Schleifen - Aktionen
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Bedingungen
                  • ((Picked unit) has buff Electric touch ) Gleich True
                • 'THEN'-Aktionen
                  • Set AmpereHuman = (Picked unit)
                  • Set PositionAmpereElectricTouchHu = (Position of (Picked unit))
                  • Einheitengruppe - Pick every unit in (Random 1 units from (Units within 700.00 of PositionAmpereElectricTouchHu matching (((Matching unit) belongs to an enemy of Spieler 11 (Dunkelgrün)) Gleich True))) and do (Actions)
                    • Schleifen - Aktionen
                      • Set ElectricTouchHumansUnit = (Matching unit)
                      • Set ElecticTouchDamage = (50.00 x (Real((Level of Electric touch for AmpereHuman))))
                      • Spezialeffekt - Create a special effect at (Position of ElectricTouchHumansUnit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
                      • Einheit - Cause AmpereHuman to damage ElectricTouchHumansUnit, dealing ElecticTouchDamage damage of attack type Zaubersprüche and damage type Blitz
                • 'ELSE'-Aktionen


+rep for help
 

Zanderist

New Member
Reaction score
5
Why would you damage a random unit?

The Auras in Diablo II never damaged random units, they damaged every unit in range.

I dunno if that's all of it, but with my new understanding of leaks, I say that trigger leaks.
 

EoW.chips

New Member
Reaction score
2
I don't play Diablo 2. I just want a random unit in the 700 aoe to get damaged. Otherwise to op.
 

Zanderist

New Member
Reaction score
5
Have you tried adding every unit within range of unit x to a unit group, then damaging random unit from that unit group yet?
 

roaaaarrrr

New Member
Reaction score
33
Probably just something like this....


Trigger:
  • Untitled Trigger 003
    • Events
      • Time - Every 2.50 seconds of game time
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman (Tier Zero)
    • Actions
      • Set ElectricTouchArea = (Units within 700.00 of (Position of (Triggering unit)))
      • Set ElecticTouchDamage = (50.00 x (Real((Level of Electric touch for AmpereHuman))))
      • Unit Group - Pick every unit in ElectricTouchArea and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Random unit from ElectricTouchArea) to ((Life of (Triggering unit)) - ElectricTouchDamage)
      • Custom script: call DestroyGroup (udg_ElectricTouchArea)
 

Inflicted

Currently inactive
Reaction score
63
// Dont do this

Every 2.5 seconds of game time
-
Unit Group - Pick every unit in (units within 400 range of "unit") matching ((owner of matching unit is not allied to player) or (owner of matching unit is not equal to owner of "unit"))
: Deal 100 damage to picked unit


or something like that. sorry its not in GUI, im not at my computer.

note: mite also need a trigger to specify the unit.
 

dudeim

New Member
Reaction score
22
@above
that would leak and it will damage all enemy units withing range
@EoW.chips
try something like this

Trigger:
  • Events: every x seconds
    • Actions:
    • Set Group = (Units within 500.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
    • Set Unit = (Random unit from Group)
    • Unit - Cause (Triggering unit) to damage Unit, dealing 500.00 damage of attack type Spells and damage type Normal
    • Custom script: call DestroyGroup(udg_Group)


this should do
Note change triggering unit to your unit with the skill (best way is probably to create a unit variable when your unit with that skill is created) (you can also add a condition if the unit learns the skill and does not have it at start)
 

EoW.chips

New Member
Reaction score
2
Now i tried this, but still doesnt work...

Trigger:
  • Electric touch
    • Ereignisse
      • Zeit - Every 2.50 seconds of game time
    • Bedingungen
    • Aktionen
      • Set AmpereHuman = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • ((Triggering unit) has buff Electric touch ) Gleich True
        • 'THEN'-Aktionen
          • Set Group_ElectricTouch = (Units within 700.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Gleich True))
          • Set RndUnit = (Random unit from Group_ElectricTouch)
          • Spezialeffekt - Create a special effect at (Position of RndUnit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
          • Einheit - Cause (Triggering unit) to damage RndUnit, dealing (50.00 x (Real((Level of Electric touch for (Triggering unit))))) damage of attack type Zaubersprüche and damage type Blitz
          • Custom script: call DestroyGroup(udg_Group_ElectricTouch)
        • 'ELSE'-Aktionen


Forgot to say that i set AmpereHuman at start
 

Chaos_Knight

New Member
Reaction score
39
@above
that would leak and it will damage all enemy units withing range
@EoW.chips
try something like this

Trigger:
  • Events: every x seconds
    • Actions:
    • Set Group = (Units within 500.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
    • Set Unit = (Random unit from Group)
    • Unit - Cause (Triggering unit) to damage Unit, dealing 500.00 damage of attack type Spells and damage type Normal
    • Custom script: call DestroyGroup(udg_Group)


this should do
Note change triggering unit to your unit with the skill (best way is probably to create a unit variable when your unit with that skill is created) (you can also add a condition if the unit learns the skill and does not have it at start)

Tested that trigger? It works atleast.. And then you could you could change "
Trigger:
  • Unit - Cause Unit to damage Unit, dealing 500.00//this is what you change damage of attack type Spells//changeable and damage type Normal//changeable
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Lol its not Jass you cant use // in there
Like this
JASS:
//Like me ok?
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Lol its not Jass you cant use // in there
Like this
JASS:
//Like me ok?

Whoops sorry. Stupid slow pc
 

dudeim

New Member
Reaction score
22
Now i tried this, but still doesnt work...

Trigger:
  • Electric touch
    • Ereignisse
      • Zeit - Every 2.50 seconds of game time
    • Bedingungen
    • Aktionen
      • Set AmpereHuman = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • ((Triggering unit) has buff Electric touch ) Gleich True
        • 'THEN'-Aktionen
          • Set Group_ElectricTouch = (Units within 700.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Gleich True))
          • Set RndUnit = (Random unit from Group_ElectricTouch)
          • Spezialeffekt - Create a special effect at (Position of RndUnit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
          • Einheit - Cause (Triggering unit) to damage RndUnit, dealing (50.00 x (Real((Level of Electric touch for (Triggering unit))))) damage of attack type Zaubersprüche and damage type Blitz
          • Custom script: call DestroyGroup(udg_Group_ElectricTouch)
        • 'ELSE'-Aktionen


Forgot to say that i set AmpereHuman at start


if you have every x seconds as event you can't have a triggering unit you should set the unit with the spell to your var when he gets the spell (though it wouldn't be MUI then you need to work with arrays and stuff not great with MUIness in gui)
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Pheonix Fire is actually a great ability will many uses. Like locust swarm and give the locusts pheonix fire AWESOME FUN.
 

Weyird

Member
Reaction score
5
I didnt read ur trigger fully but you could use the unit ability "Phoenix Fire". You can set how often it shoots out, and how much damage it does. It unfortunately doesnt have an icon on the unit so U'll just need to give it a dummy icon that does nothing, through triggers if you need to.

EDIT: Oops, only see this was mentioned already now.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top