Range problems

Razalgrim

New Member
Reaction score
10
Trigger:
  • Assault Rifle
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pulse Rifle
    • Actions
      • Set Caster = (Triggering unit)
      • Set CasterLoc = (Position of Caster)
      • Set Rifle_Offset = 0.00
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Rifle_Offset = (Rifle_Offset + 100.00)
          • Set AROffset = (CasterLoc offset by Rifle_Offset towards (Facing of Caster) degrees)
          • Set UnitGroup = (Units within 100.00 of AROffset matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Undead) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of Caster)) Equal to True))))
          • Unit Group - Pick every unit in UnitGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause Caster to damage (Picked unit), dealing (Random real number between 75.00 and 100.00) damage of attack type Hero and damage type Normal
              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\GyroCopter\GyroCopterImpact.mdl
              • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_CasterLoc)
          • Custom script: call RemoveLocation(udg_AROffset)
          • Custom script: call DestroyGroup(udg_UnitGroup)


What I'm trying to do here is to damage all units in front of the caster in a line shape. Unfortunately, the skill only hits units at a range of about 150 from the caster. Can anyone help?
 

Weep

Godspeed to the sound of the pounding
Reaction score
401
You should destroy CasterLoc outside of the loop. Right now, you're removing that point while you're still trying to use it...
 

Razalgrim

New Member
Reaction score
10
Ah, I didn't notice that. Will try it right now.

EDIT: I'd + rep you, but I just did so recently. It works now, thanks.
 
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