• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Range

Status
Not open for further replies.
i think you can use it on a skill when a ability is learned then it's equal to you ability then upgrade the rifles/upgrade in the technology using a dummy unit with .mdl model.
 
Ouch. So you do not want a pemanent upgrade.

There is the probleme: no way is perfect, since we can not raise or decrease the range with natives or skill in W3.

Methods:
1-change the unit and replace it with a clone using the same properties, but with a high range. When the unit leaves your region, replace again your unit with the old one.
Cons: hard to code since you maybe need to save a lot of properties for your units; not easy with heroes or morhping units.

2-create 2 upgrades with hundred levels, one who raises the range, one who reduces the range. On unit entering the region, add a level to the upgrade who raises the range, on unit leaving it, add a level to the upgrade who reduces the range.
Cons: when you used all the levels of your upgrade, it will not work again since it is impossible to level down an upgrade. And only upgrade "really" change the range of the unit.

3-give your unit the range you want when it enters the region in the object editor.
Example: your unit has a range of 1000, and, in the region, you want a range of 2000.
Then, in the object editor, you set its range to 2000. After this during the game, you have to detect each time the unit attacks. If the range between the unit and the target is more than 1000 AND that your unit is not in the region, you block the attack by ordering your unit to stop.
Cons: uses a lot the W3's engine if you get a lot of units in your map. More, it's a bit weird since your unit will not try to follow the targets.
 
I think your best option is to use the Chaos ability.

You have to make two custom versions of Chaos for each unit, and two versions of each unit, so if there are a lot of unit types on your map, this could take a while.

Make two versions of each unit, with different ranges, and a chaos ability for each of those. When a normal unit enters the region, you give him the chaos ability for the longer ranger version, and then when he leaves, you give him the other one.

The only major pitfall (that I know of) is that hitting someone with the same chaos ability twice in a row does crazy things to his damage numbers.

Props to Nightseer who inspired this technique, over here.
 
Hey i have made a passive that does what you want here is the trigger i used
i used true shot aura as base spell and long rifle for range bonus.

  • Improve Gun
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Improve Gun
    • Actions
      • Player - Set the current research level of Improve Gun (upgrade) to (Level of Improve Gun for (Triggering unit)) for (Owner of (Triggering unit))
well nvm i suppose since you don't want it pera increase
 
Status
Not open for further replies.
Back
Top