Reduce Tech Level

Level 17
Joined
Feb 11, 2011
Messages
1,860
Hi,

I am trying to make a toggle-able ability where if you activate it, your hero's range increases. When you click it again, it switches to another ability and your range goes back to default. I am having trouble removing the tech. I created an upgrade that increases the range and that works, but I cannot reduce the attack range again.

Any help?

Thanks,

Mr_Bean
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
It is a hard-coded engine in Warcraft III that lets you to increase unit's range, but never decrease it (by reducing the tech level).

You need to create an upgrade that works 2 ways, Level 1 Upgrade will increase range, Level 2 Upgrade will decrease range and so on, but that will take you to a limit because how many Upgrades you intend to do, right ?

Perhaps you can achieve by setting the unit's acquisition range to dynamically change, and use the Conditions;
  • (Current acquisition range of (Triggering unit)) Less than or equal to 500.00
 
Level 8
Joined
Sep 7, 2008
Messages
320
It is a hard-coded engine in Warcraft III that lets you to increase unit's range, but never decrease it (by reducing the tech level).

You need to create an upgrade that works 2 ways, Level 1 Upgrade will increase range, Level 2 Upgrade will decrease range and so on, but that will take you to a limit because how many Upgrades you intend to do, right ?

Perhaps you can achieve by setting the unit's acquisition range to dynamically change, and use the Conditions;
  • (Current acquisition range of (Triggering unit)) Less than or equal to 500.00

This trigger never work :ogre_hurrhurr: on reducing attack range
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Update:
So I created an ability based of Bear Form, and created a new version of the hero which has 150 more range. However, when the hero casts the ability, the transformed hero doesn't get extra range. Any ideas? Should I not have based it off Bear Form?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
It's under Combat - Acquisition Range in Object Editor.
You can have an attack range less than or equal to that Acquisition Range, but cannot be greater.

Since you have a 600 Acquisition Range in Object Editor for that unit, that unit can't have attack range more than 600 even if you set the Combat - Attack 1 - Range to a higher value than 600.

In other words, you must change it first before applying a higher value of Acq. Range.
 
Top