Damage Area (but not damage the allied units)

L

Largs

Guest
How do I make to damage only enemies in the area??
I tried that but it isn't works
Code:
Arcane Explosion
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Arcane Explosion 
    Actions
        Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 500.00 at (Position of (Casting unit)), dealing 800.00 damage of attack type Spells and damage type Fire
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Try this:

Code:
Damage Unit
    Events
    Conditions
    Actions
        Set TempPoint = <Some Point>
        Set TempGroup = (Units within 300.00 of TempPoint)
        Unit Group - Pick every unit in TempGroup and do (Actions)
            Loop - Actions
                Unit - Cause <Some Unit> to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
        Custom script:   call DestroyGroup(udg_TempGroup)
        Custom script:   call RemoveLocation(udg_TempPoint)
 

Mapster

New Member
Reaction score
4
I've wanted to do that before but didn't know how, thanks Ghan lol, even though i wasn't asking lol.
 
L

Largs

Guest
Try this:

Code:
Damage Unit
    Events
    Conditions
    Actions
        Set TempPoint = <Some Point>
        Set TempGroup = (Units within 300.00 of TempPoint)
        Unit Group - Pick every unit in TempGroup and do (Actions)
            Loop - Actions
                Unit - Cause <Some Unit> to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
        Custom script:   call DestroyGroup(udg_TempGroup)
        Custom script:   call RemoveLocation(udg_TempPoint)

Man i tried that:
Code:
Arcane Explosion ON
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Arcane Explosion 
    Actions
        Unit Group - Pick every unit in (Units within 800.00 of (Position of Arcane_explosion_caster)) and do (Actions)
            Loop - Actions
                Unit - Cause Arcane_explosion_caster to damage (Picked unit), dealing 800.00 damage of attack type Spells and damage type Normal
But that doesn't works¬¬'
and why Set TempPoint = <Some Point>???
 

RedRage

New Member
Reaction score
7
Here is copy of my spell which doesn't damage allies

Code:
Untitled Trigger 009
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Smite 
    Actions
        Set Intelligence = (Intelligence of (Triggering unit) (Include bonuses))
        Set Convert = (Real(Intelligence))
        Set TargetPoint = (Position of (Triggering unit))
        Set UnitGroup = (Units within 700.00 of TargetPoint matching ((((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to False) and (((Matching unit) is alive) Equal to True)))
        Wait 0.30 seconds
        Unit Group - Pick every unit in UnitGroup and do (Actions)
            Loop - Actions
                Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Convert x 4.00) damage of attack type Spells and damage type Normal
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Slow\SlowCaster.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Demon\DarkConversion\ZombifyTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Camera - Shake the camera for (Owner of (Triggering unit)) with magnitude 3.00
        Wait 1.00 seconds
        Camera - Stop swaying/shaking the camera for (Owner of (Triggering unit))
        Custom script:   call DestroyGroup(udg_UnitGroup)
        Custom script:   call RemoveLocation(udg_TargetPoint)


You just gotta set who it damages, then make an damage unit loop to damage all the units.
 

Mapster

New Member
Reaction score
4
Here is copy of my spell which doesn't damage allies

You just gotta set who it damages, then make an damage unit loop to damage all the units.

Thats a good idea but why not this:

Code:
Event: A unit Begins casting an ability
Condition: Ability is equal to (Kaboom)
Action:

  Unit group - Pick every unit in (with 700 range if targeted area) and do actions:
Loop:
        If: (picked unit) is not equal to (picked unit is an ally of (owner of casting unit))
    Then: Cause Casting unit to Damage Picked unit with....
  Else:

No variables required except for the intelligence.
 
L

Largs

Guest
Here is copy of my spell which doesn't damage allies

Code:
Untitled Trigger 009
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Smite 
    Actions
        Set Intelligence = (Intelligence of (Triggering unit) (Include bonuses))
        Set Convert = (Real(Intelligence))
        Set TargetPoint = (Position of (Triggering unit))
wner of (Casting unit))) Equal to False) and (((Matching unit) is alive) Equal to True)))        Set UnitGroup = (Units within 700.00 of TargetPoint matching ((((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to False) and (((Matching unit) is alive) Equal to True)))
        Wait 0.30 seconds
        Unit Group - Pick every unit in UnitGroup and do (Actions)
            Loop - Actions
                Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Convert x 4.00) damage of attack type Spells and damage type Normal
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Slow\SlowCaster.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Demon\DarkConversion\ZombifyTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Camera - Shake the camera for (Owner of (Triggering unit)) with magnitude 3.00
        Wait 1.00 seconds
        Camera - Stop swaying/shaking the camera for (Owner of (Triggering unit))
        Custom script:   call DestroyGroup(udg_UnitGroup)
        Custom script:   call RemoveLocation(udg_TargetPoint)


You just gotta set who it damages, then make an damage unit loop to damage all the units.

Code:
(Units within 700.00 of TargetPoint matching ((((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to False) and (((Matching unit) is alive) Equal to True)))
where did you found that???
 

RedRage

New Member
Reaction score
7
Code:
Untitled Trigger 009
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Smite 
    Actions
        Set Intelligence = (Intelligence of (Triggering unit) (Include bonuses))
        Set Convert = (Real(Intelligence))
        Set TargetPoint = (Position of (Triggering unit))
        Set UnitGroup = (Units within 700.00 of TargetPoint matching ((((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to False) and (((Matching unit) is alive) Equal to True)))
        Wait 0.30 seconds
        Unit Group - Pick every unit in UnitGroup and do (Actions)
            Loop - Actions
                Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Convert x 4.00) damage of attack type Spells and damage type Normal
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Slow\SlowCaster.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Demon\DarkConversion\ZombifyTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Camera - Shake the camera for (Owner of (Triggering unit)) with magnitude 3.00
        Wait 1.00 seconds
        Camera - Stop swaying/shaking the camera for (Owner of (Triggering unit))
        Custom script:   call DestroyGroup(udg_UnitGroup)
        Custom script:   call RemoveLocation(udg_TargetPoint)
Set UnitGroup = (Units within 700.00 of TargetPoint matching ((((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to False) and (((Matching unit) is alive) Equal to True)))
For this:
The variable is point
and that is Units In Range Matching Condition
and the condition is And
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top