How to make a skill which is passive, hit creeps and heroes?

joohen

New Member
Reaction score
20
I would like to know how to make a skill when enemies are close to you and it hits the surrounding creeps like how the old Razor in DotA.Sorry for my poor english.
 

roXplosive

New Member
Reaction score
15
If you have Jass knowledge you could do the following :

1. When the passiver is learned add the learning unit to a group
2. Every (1-3 seconds) for all units with the passive check in a certain AoE and depending on the level ofthe skill damage the enemies there

In GUI you should do : every (x sec) check for all the units on the map if they have the passive . If so select all units nearby the unit with the skill and damage them if they are enemy of the selected unit according to skill level .
 

Summoned

New Member
Reaction score
51
Putting roXplosive's words into two triggers:

You'll need 4 variables: ShockTroopers (unit group), ShockVictims (unit group), Shocker (unit) and ShockCenter (point)

Replace MegaShock with your spell's name, the 3 second timer with how often you want it to activate, the (Real((((Level of MegaShock for Shocker) x 30) + 60))) with how much damage you want it to do, the 700 with your range and the special effect with what you want to appear on the victims.

Trigger:
  • Shock1
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to MegaShock
      • ((Triggering unit) is in ShockTroopers) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to ShockTroopers

Trigger:
  • Shock2
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ShockTroopers and do (Actions)
        • Loop - Actions
          • Set ShockCenter = (Position of (Picked unit))
          • Set Shocker = (Picked unit)
          • Set ShockVictims = (Units within 700.00 of ShockCenter matching (((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to False))
          • Unit Group - Pick every unit in ShockVictims and do (Actions)
            • Loop - Actions
              • Unit - Cause Shocker to damage (Picked unit), dealing (Real((((Level of MegaShock for Shocker) x 30) + 60))) damage of attack type Spells and damage type Normal
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
              • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_ShockCenter)
          • Custom script: call DestroyGroup(udg_ShockVictims)
          • Custom script: set udg_Shocker = null
 

joohen

New Member
Reaction score
20
Putting roXplosive's words into two triggers:

You'll need 4 variables: ShockTroopers (unit group), ShockVictims (unit group), Shocker (unit) and ShockCenter (point)

Replace MegaShock with your spell's name, the 3 second timer with how often you want it to activate, the (Real((((Level of MegaShock for Shocker) x 30) + 60))) with how much damage you want it to do, the 700 with your range and the special effect with what you want to appear on the victims.

Trigger:
  • Shock1
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to MegaShock
      • ((Triggering unit) is in ShockTroopers) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to ShockTroopers

Trigger:
  • Shock2
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ShockTroopers and do (Actions)
        • Loop - Actions
          • Set ShockCenter = (Position of (Picked unit))
          • Set Shocker = (Picked unit)
          • Set ShockVictims = (Units within 700.00 of ShockCenter matching (((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to False))
          • Unit Group - Pick every unit in ShockVictims and do (Actions)
            • Loop - Actions
              • Unit - Cause Shocker to damage (Picked unit), dealing (Real((((Level of MegaShock for Shocker) x 30) + 60))) damage of attack type Spells and damage type Normal
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
              • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_ShockCenter)
          • Custom script: call DestroyGroup(udg_ShockVictims)
          • Custom script: set Shocker = null


When i typed in "Custom script: set Shocker = null" warcraft 3 showed me a error " Expected a variable name"
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
why are you nulling a global unit variable??? that doesnt make sense to me.
also why dont you just use immolation?
 

Squirel

New Member
Reaction score
13
Use permanent immolation, change the duration - hero and duration - unit to the interval between your shocks, change the animation on the buff to your shock and voilà, you should have your spell. No GUI, JASS, or triggers involved...
 

Summoned

New Member
Reaction score
51
Well, guess I've been writing too many triggers lately. Never notice when a normal ability will do. :(
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top