Disable unit turning

Status
Not open for further replies.
Level 9
Joined
Mar 26, 2017
Messages
376
I was wondering if there is a known way to disable unit turning.

The reason for this: I make a strategy map where players are able to build walls to defend themself. However, there is a problem where units keep wanting to prioritise ranged units behind the walls, causing them to run around aimlessly - very annoying!

I found out it is possible to make a structure have the same attack priority as 'regular' units if following three conditions are met:
-the structure has a nonzero movement speed
-the structure has a functional attack
-the structure's armor type is anything but fortified

Now I found that by setting propulsion window to 0, it is possible to make structures stay locked into place without losing priority.
The one remaining problem is that buildings will turn to face enemy units in an attempt to attack them.
A turn rate of 0 still allows them to turn very slowly.

I've tried a bunch of things, but didn't succeed yet:
-acquisition range to 1: they still turn to attack nearby units
-setting 'targets allowed' to another unit type than the attacker: the structures are no longer prioritised
-adding worker classification (either by trigger or in editor): the structures are no longer prioritised

Is there any known way to prevent structures from turning around, yet having them as high priority as other units for attackers?
 
Last edited:
Level 9
Joined
Mar 26, 2017
Messages
376
After more experimentation, I found a workable solution that makes structures have the same aggro as (ranged) units.

In addition to the properties above, I have the structures channel a dummy tranquility with duration 9999. Despite them not attacking, they will still aggro units.
I also tried having them channel 'channel' spell instead, but somehow this turns off aggro for them.

The structures need to be ordered to recast tranquility every time they use an ability or are upgraded.

I'm quite pleased with how it works, but if someone knows a more elegant solution I'd be glad to hear.
 
Status
Not open for further replies.
Top