• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Increasing attack range to unit problem

Status
Not open for further replies.
Level 10
Joined
Jun 17, 2014
Messages
236
i want to create a spell that increase 75 attack range to unit when learned.
i have use long rifle and archer upgrade, but sadly it dont work.
when the unit learn my spell, set current research level to current level + 1.

in my another spell i have metamorphosis that change unit(ranged) to melee, is that the problem?, or nah?.

can anyone explain what's the problem?
 
Post your triggers.
Be aware that upgrades can not be unlearned and apply to all units of that type.

The only reliable way to change attack range dynamically per unit is via morphing.

For regular units, you can use the "Chaos" ability for that. You just need to add that ability and the unit will change as defined in the ability.

For heroes, "Chaos" has some nasty bugs, but you can use a trick that was discovered some time ago in which you can basicly use a normal morph ability with inverted unit fields, apply and remove that ability and the unit will change without actually having to actively cast that ability.

This is known as "Passive Hero Transformation" in the forums.
 
Level 10
Joined
Jun 17, 2014
Messages
236
but if i turn my unit to melee (the metamorphosis) did it give bonus attack range to my unit?, if yes it will look weird.
and if i change to ranged after melee, did it give bonus attack range?

EDIT : oh and this is my trigger
  • Dwarven Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to My Spell
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of My Spell for (Triggering unit)) Equal to 1
        • Then - Actions
  • Player - Set the current research level of Increase range (+75 per lvl) to 1 for (Owner of (Triggering unit))
    • Set DSn_Value = (Custom value of (Triggering unit))
    • Unit Group - Add (Triggering unit) to DSn_Group
    • Unit - Set (Triggering unit) acquisition range to ((Current acquisition range of (Triggering unit)) + 75.00)
    • Set DSn_Damage[DSn_Value] = 35.00
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of My spell for (Triggering unit)) Equal to 2
        • Then - Actions
  • Player - Set the current research level of Increase range (+75 per lvl) to 2 for (Owner of (Triggering unit))
    • Set DSn_Value = (Custom value of (Triggering unit))
    • Unit - Set (Triggering unit) acquisition range to ((Current acquisition range of (Triggering unit)) + 75.00)
    • Set DSn_Damage[DSn_Value] = 55.00
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of My Spell for (Triggering unit)) Equal to 3
        • Then - Actions
  • Player - Set the current research level of Increase range (+75 per lvl) to 3 for (Owner of (Triggering unit))
    • Set DSn_Value = (Custom value of (Triggering unit))
    • Unit - Set (Triggering unit) acquisition range to ((Current acquisition range of (Triggering unit)) + 75.00)
    • Set DSn_Damage[DSn_Value] = 75.00
    • Else - Actions
 
Status
Not open for further replies.
Top