Attack Question

brc

New Member
Reaction score
1
I have a hero that's an archer and it's attack range is about 700. I want the attack range to be max when he uses his searing arrows though. Like if my archer uses searing arrows, it can hit enemy units from across the map. How do i change the attack range of my hero whenever it uses searing arrow? Thanks
 

Tom Jones

N/A
Reaction score
437
The Chaos ability.
Allows us to switch one unit type with another. If we give it two levels we can switch back and forth between the unit types by increasing/decreasing the level of the ability.

The heroes.
I created two heroes, one original (this is the unit id used for the first level of the chaos ability) and another hero with increased attack range (this is the unit id used for the second level of the ability)

The triggers.
Trigger:
  • Searing Arrow onLearn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Priestess of the Moon (Normal)
          • (Unit-type of (Triggering unit)) Equal to Priestess of the Moon (Morphed)
      • (Learned skill level) Equal to 1
    • Actions
      • -------- This trigger is obsolete if the morphed unit has the same abilities, else it is very important to have it. --------
      • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(),true,GetLearnedSkill())
The above trigger is used to make abilities learned by either of the above described unit types permanent, so abilities aren't lost when switching from one unit type to the other. If the two unit types have the same set of abilities, the above trigger is obsolete (thus why it is disabled in the map).

Trigger:
  • Searing Arrow onCast
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(flamingarrows))
          • (Issued order) Equal to (Order(unflamingarrows))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(flamingarrows))
        • Then - Actions
          • Unit - Add Searing Arrow (Morph) to (Triggering unit)
          • Unit - Set level of Searing Arrow (Morph) for (Triggering unit) to 2
        • Else - Actions
          • Unit - Add Searing Arrow (Morph) to (Triggering unit)
The above trigger simply checks for the on and off order of Searing Arrow. If the unit is ordered Searing Arrow on, then we add the chaos ability, set its level to 2 and thus change the unit type of the caster to the one with increased attack range. If the unit is ordered Searing Arrow off, we add the ability again, this time however we do not set its level, which mean that it's level one and thus it'll switch the unit type again, this time to the original unit type. The reason we add the Chaos ability again, is because it is lost during the first switch (because it isn't permanent, and non-permanent abilities are lost during a switch), when the unit was ordered Searing Arrow on.

With the map and these notes I'm sure you'll be able to get some sense out of it. Please let me now once I can take the map down (PM me).
 

brc

New Member
Reaction score
1
Thanks and I got some questions though. Is there another way to do this? Like when u use searing arrow it activates combat 2 and combat 2 has a high range. Also when i give PoTM a ring of protection, and i right click searing arrow a few times, the armor goes up to like a million. lol And lastly, is it possible to make the chaos activate when i use searing arrow on a target? Thanks again.
 

perkeyone

something clever
Reaction score
71
both attack have the same range

when blizzard made the game they forgot to split it up into two catagories

therefore attack one always has the same range as attack two

for the question about insane armor

you will need to make a condition in the "searing arrow learn" trigger so that it doesnt make item abilities permanent

like "learned skill not equal to any item skill" idk exactly what to put.
 
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