• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

[General] Cannot make long range units

Status
Not open for further replies.
Level 1
Joined
May 26, 2016
Messages
4
I have simple problem that has been bugging me for a long time.

I cannot seem to make units that have very long range attacks. When I start working on a unit with a ranged attack, the game seems to refuse to acknowledge high range values such as 3000. I give the unit these high range values but when I test my map the range is plain old 500-600.

What causes this and how do I deal with it? I haven't found any range cap in game play constants holding this back.
 

Ardenian

A

Ardenian

Additionaly to the attack range, you need to adjust another option.
If the unit's acquisition range is 500, then the unit can only attack within the 500 range,
since it does not recognize targets outside of this range.

It should be under the two attack data, somewhere next to armor, called acquisition range or something.
You need to change that in the object data of the unit, too, afaik.
 
Level 1
Joined
May 26, 2016
Messages
4
Thank you, it works.

However it opens up another problem which is that I don't want the unit (an artillery emplacement) to just attack willy nilly at incredibly long ranges without the players direct attack commands.

I know changing it to worker will remove its automatic attacking of the enemy but has some undesired side effects.

Do you know how to deal with that?

Thanks.
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
Thank you, it works.

However it opens up another problem which is that I don't want the unit (an artillery emplacement) to just attack willy nilly at incredibly long ranges without the players direct attack commands.

I know changing it to worker will remove its automatic attacking of the enemy but has some undesired side effects.

Do you know how to deal with that?

Thanks.

JASS:
native SetUnitAcquireRange takes unit u, real range returns nothing
set whatever aggro range you want
 
Level 1
Joined
May 26, 2016
Messages
4
I made its valid targets be none but gave it the aoe artillery attack I needed, this is working pretty much as I intended.

Thank you all for your time!
 
Status
Not open for further replies.
Top