Item Passive Ability

FootysMaXeD

New Member
Reaction score
0
Hello, i'm trying to make an item that has a similar effect to Cloak of Immolation.

It shoots 5 bolts of lightning to 5 random enemy units (not magic immune or buildings) every 3 seconds, dealing 50 damage.

I have tried creating the trigger for this item, but I cannot figure out a way to find the units that have this item correctly...
Trigger:
  • Events - Every 3 seconds of game time
    • Set TempGroup1 = (Units owned by (Owner of (Item carried by (Matching unit) of type Zapper)) matching (((Matching unit) is A Hero) Equal to True))
    • Unit Group - Pick every unit in TempGroup1 and do (Actions)
      • Unit Group - Pick every unit in (Random 5 units from (Units within 400 of (Position of (Position of (Picked unit)) matching (((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Random unit from TempGroup1) to damage (Picked unit), dealing 50.00 damage of attack type Normal and damage type Universal.
    • Custom script: call DestroyGroup(udg_TempGroup1)


I sorta need this to be MUI, becauce it's an item that anyone can purchase.
Also, what would be the best way to create the SFX for the monsoon bolt on affected units.

Thank you
 

ultimate11

Active Member
Reaction score
25
i think you will need 2 trigger
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type Tome of Experience) Equal to True
    • Actions
      • Set Hero = (Triggering unit)

Trigger:
  • Untitled Trigger 002
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Random 5 units from (Units within 512.00 of (Position of Hero) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Owner of (Matching unit)) is an enemy of (Owner of Hero)) Equal to True) and do (Actions)
        • Loop - Actions
          • Unit - Cause Hero to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • -------- Or what ever you want like special effects or others --------
 

Nherwyziant

Be better than you were yesterday :D
Reaction score
96
i think you will need 2 trigger
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type Tome of Experience) Equal to True
    • Actions
      • Set Hero = (Triggering unit)

Trigger:
  • Untitled Trigger 002
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Random 5 units from (Units within 512.00 of (Position of Hero) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Owner of (Matching unit)) is an enemy of (Owner of Hero)) Equal to True) and do (Actions)
        • Loop - Actions
          • Unit - Cause Hero to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • -------- Or what ever you want like special effects or others --------

no, that's really wrong!

Try mine...

Trigger:
  • Immolation
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Set Unit_Group[0] = (Units in (Entire map) matching (((Matching unit) has an item of type Staff of Negation) Equal to (==) True))
      • Unit Group - Pick every unit in Unit_Group[0] and do (Actions)
        • Loop - Actions
          • Set Unit[0] = (Picked unit)
          • Set Point[0] = (Position of Unit[0])
          • Set Unit_Group[1] = (Random 5 units from (Units within 400.00 of Point[0] matching (((((Matching unit) is A structure) Not equal to (!=) True) and (((Owner of (Matching unit)) is an ally of (Owner of Unit[0])) Not equal to (!=) True)) and ((((Matching unit) is Mechanical) Not eq
          • Unit Group - Pick every unit in Unit_Group[1] and do (Actions)
            • Loop - Actions
              • Set Unit[1] = (Picked unit)
              • Unit - Cause Unit[0] to damage Unit[1], dealing 50.00 damage of attack type Spells and damage type Normal
              • Special Effect - Create a special effect attached to the origin of Unit[1] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set Unit[1] = No unit
          • Custom script: call DestroyGroup(udg_Unit_Group[1])
          • Custom script: set udg_Unit_Group[1] = null
          • Custom script: call RemoveLocation(udg_Point[0])
          • Custom script: set udg_Point[0] = null
          • Set Unit[0] = No unit
      • Custom script: call DestroyGroup(udg_Unit_Group[0])
      • Custom script: set udg_Unit_Group[0] = null


HAPPY NEW YEAR
 

FootysMaXeD

New Member
Reaction score
0
+rep

Thank you so much Nherwyziant!

It's working nicely now :D
I added a condition not to hit Dead units too. I hope this is MUI :D.
 

sLsIDK

New Member
Reaction score
13
Even though you've already finished this, I thought I could mention phoenix fire.
 

FootysMaXeD

New Member
Reaction score
0
This is so much better, because it hits the targets at the same time. And it gives me much more control over it I think.

How do i make this not work on images? Thats the only bug I found.
 

sLsIDK

New Member
Reaction score
13
You can some how increase the targets, I couldn't find it but I have to go. I think you can just add the spell to the item more than once for five units. And the cooldown is set to 0.50 so you can change it to 3.00
 

FootysMaXeD

New Member
Reaction score
0
Thanks for your earlier help Nherwyziant!

I had to fix a few bugs, because it was working when the hero was invisible, and it also worked on images of the hero, and hit invisible targets too lol. But now that it's working fine, I want to make a recipe out of it that also purges the target hit.

This upgraded recipe will merely hit one target every few seconds, sorta like a hero killer. I just can't figure out how to get it to purge the target.

Unit - Order Unit[0] to "Orc Shaman - Purge" Unit[1]
I know this is probably a bad way to do it, but my only other option is to manually slow the movement speed of the target. The problem with that is that it doesn't give me the option to do damage to summons.
 

Ayanami

칼리
Reaction score
288
You'll need a dummy unit. A dummy unit is basically a unit with no model file, so that it is "invisible" in game. Give this dummy the purge ability. When you need to purge the enemy, create the dummy unit and order it to cast purge. Then remember to add an expiration timer to remove it.
 
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