Is it possible to make stim autocast when attacking enemy units?

Strilanc

Veteran Scripter
Reaction score
42
I have a modified stim ability, with no hp cost, and I want to have it autocast when the caster is attacking an enemy unit.

What I tried to do is use the same validators as the charge ability, since it has the autocast behavior I want. Unfortunately, now the unit just constantly autocasts stim whenever it is attack-moving.

How do I make the ability autocast when 1) the caster is attack-moving, 2) has acquired a target, and 3) is near that target.
 

Builder Bob

Live free or don't
Reaction score
249
Would it be acceptable to combine the stim buff with the unit's weapon? Not a very elegant solution I will admit
 

Strilanc

Veteran Scripter
Reaction score
42
I figured out how to do it. I needed two validators:
1) A 'Unit Compare Order Target Range' validator to check the distance from the caster to its target (and also so specify the Attack ability).
2) A 'Unit Order Target Type' validator, with just the default settings, to prevent autocasting when reaching an attack-moved point.

So now I have an ability which autocasts when the caster has a nearby attack target, including units acquired while attack-moving. The reason I didn't use charge is because I wanted it to be usable as a fleeing ability as well.
 
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