Modified Unit Attack Rang

Komaqtion

You can change this now in User CP.
Reaction score
469
This is unfortunately not possible...

The only way to this, in a way, is to make every unit only use their "Attack 1" all the time, and make their "Attack 2" have slightly more range, and when a unit picks up the item, make that unit use their "Attack " instead of "Attack 1" :D
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, as said you need to make sure that the field called "Combat - Attacks Enabled" in the Object Editor is set to "Attack 1 Only" and that you've set every field of "Attack 2" to the same as "Attack 1", just changed the range of the attack.

Then you will use a modified version of an orb ability, like "Item Attack Fire Bonus", and change the values called:
Data - Damage Bonus -> 0
Data - Enabled Attack Index -> 2 (Should be this already, but just make sure it is ;))

Then also, if you wouldn't like to get the flying orb around you, or change the missile art then change these value too:
Art - Missile Art -> None
Art - Special -> None
Art - Target -> None

Then, whenever your unit picks up the item you want, add this ability to it, and whenever it doesn't have it anymore, remove it :D

Will give you an example trigger in a minute for this ;)

Trigger:
  • Increased Attack Range
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
    • Actions
      • Set TempInt = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Claws of Attack +15
            • Then - Actions
              • Set TempInt = (TempInt + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt Equal to 1
        • Then - Actions
          • Unit - Add Item Attack Fire Bonus to (Triggering unit)
        • Else - Actions


Trigger:
  • Decreased Attack Range
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
    • Actions
      • Set TempInt = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Claws of Attack +15
            • Then - Actions
              • Set TempInt = (TempInt + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt Equal to 0
        • Then - Actions
          • Unit - Remove Item Attack Fire Bonus from (Triggering unit)
        • Else - Actions


These triggers aren't tested, but I'd believe they should work :S XD
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
units will always use their first attack when they got 2 attacks with the same targets allowed.
 

Inflicted

Currently inactive
Reaction score
63
okay i know this is a random suggestion, but maybe itl work. i dont know i havent tried it, just an idea.

when some1 picks up the item, add searing arrows with an increased range and set it on autocast?

change the projectile and set the range to more than that units range. could be usefull if there are few unit types of hero's in the game.

but if there are not, do not suggest my 'method' because ud have to make an ability for each unit or something which could be a pain.

when the item is dropped remove the ability or something..

-

otherwiz, isnt there an upgrade that increases range?

i dont know if u can remove the upgrade if the item is dropped tho.

so either dont use this, or make the item undroppable.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
if you give searing arrows (or similar abilities) an attack range beyond the attack range of the unit the unit can still not attack any further. if you try to manually use searing arrows at a higher range then the owning units attack range the attack will always miss.

and you cannot undo upgrades. once you have researched an upgrade for increased attack rate the increasement cannot be removed anymore.
 

xXGauntletXx

New Member
Reaction score
4
There is a way to do this through using a separate unit, similar to how dummy spells work. Copy your first unit, and edit the attack range to be different on the copy. Then you'll need to trigger the change (I'll post that trigger after this game of Angel Arena. :D)

EDIT: Here's the trigger I used to do this:

Trigger:
  • Events
    • A unit Acquires an item
    • Conditions
    • (Unit-type of (Triggering unit)) equal to FirstUnit
    • Actions
    • Unit - Replace Triggering unit with a SecondUnit using The old unit's relative life and mana
 

Mindless

New Member
Reaction score
4
How about giving the unit in question a used upgrade: that Long Rifles upgrade of Human Riflemen? When ever it picks up an item, set the researched level of the upgrade Long Rifles to 1. When it drops the item, set it back to 0.
 

Inflicted

Currently inactive
Reaction score
63
How about giving the unit in question a used upgrade: that Long Rifles upgrade of Human Riflemen? When ever it picks up an item, set the researched level of the upgrade Long Rifles to 1. When it drops the item, set it back to 0.

thats exactly what i said, and Accname proved me wrong. read up.
 
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