Spreading Shadow Strike

THE_X

New Member
Reaction score
49
hey guys so iv got this massive infection ability, its pretty much shadow strike and it spreads to allies of the shadow strike if they don't have it already. now only problem i have is knowing how the dummy unit i have spreading the shadow strike know who the caster was so that the dummy is owned by the player that casted it in the first place. heres my trigger i have so far

Code:
Mass Infection
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set Group[1] = (Units in (Playable map area) matching (((Matching unit) has buff Mass Infection ) Equal to True))
        Unit Group - Pick every unit in Group[1] and do (Actions)
            Loop - Actions
                Set Point[1] = (Position of (Picked unit))
                Set Group[2] = (Units within 140.00 of Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and ((((Matching unit) has buff
                Unit Group - Pick every unit in Group[2] and do (Actions)
                    Loop - Actions
                        Set Point[2] = (Position of (Picked unit))
                        Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point[2] facing Default building facing degrees
                        Unit - Add Mass Infection Dummy  to (Last created unit)
                        Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
                        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                        Custom script:   call RemoveLocation (udg_Point[2])
                Custom script:   call RemoveLocation (udg_Point[1])
                Custom script:   call DestroyGroup (udg_Group[2])
        Custom script:   call DestroyGroup (udg_Group[1])

the unit creation should not be owner of triggering unit, i just kept it like that because i dont know how to identify the orginal caster
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I believe you might need hashtables for this. Also, is there more than one unit that has this ability? You could use a For Loop for each player, if it only has to be MPI.
 

HydraRancher

Truth begins in lies
Reaction score
197
I believe you might need hashtables for this. Also, is there more than one unit that has this ability? You could use a For Loop for each player, if it only has to be MPI.

Technically Custom Value would work just as fine, but Hashtables are more efficient if coding in multiple spells. Replace 'Owner of Triggering Unit' with the relevant array variable.
 
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