I am trying to get my unit to acquire targets at a farther distance than default. As in, when they are attack moving, they will engage enemies en-route.
I assume they are acquiring enemy targets based-off a distance setting. As I searched for answers, I thought this distance was controlled by the weapon's - minimum scan range field.
I have set the weapon Minimum Scan Range to several test numbers, 3, 10, 20, 30, 50, 500 (max). The unit responds to the weapons Minimum Scan Range 3, 5, 10, 20 as expected; but it seems limited to a range of roughly 24.
The unit will not engage enemies at a distance farther than 24, even if i set the weapon's minimum scan range to 500 (max). notes: weapon scan filter visibility flags - allowed, unit use line of sight - disabled.
Does anyone have a solution, information, tutorial or starting point to look for a solution?
Solved, wow, i always miss the the most simplistic reasons. So I used that as a premise to start my problem solving process over and found the problem.
Indeed, leash settings. It seems if the unit object leash settings are set to -1, then it uses the max leash allowed by GameData. My current thoughts are to use leash of 50, and reduce incrementally based on lag level.
And yes again, lag will be terrible if you go max. No, I don't have an alternative to this solution, except to not use leash and instead, rely on behavior, scan, issue order with validators to avoid un-necessary scans.
Soooo, if anyone has an alternative solution to manipulate general unit actions, please chime in.
the best performing solution is done with triggers. basically have a unit group of possible targets, a unit group of units that need a target, then iterate over the attacking units, get lowest distance, issue order to attack closest unit.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am trying to get my unit to acquire targets at a farther distance than default. As in, when they are attack moving, they will engage enemies en-route.
I assume they are acquiring enemy targets based-off a distance setting. As I searched for answers, I thought this distance was controlled by the weapon's - minimum scan range field.
I have set the weapon Minimum Scan Range to several test numbers, 3, 10, 20, 30, 50, 500 (max). The unit responds to the weapons Minimum Scan Range 3, 5, 10, 20 as expected; but it seems limited to a range of roughly 24.
The unit will not engage enemies at a distance farther than 24, even if i set the weapon's minimum scan range to 500 (max). notes: weapon scan filter visibility flags - allowed, unit use line of sight - disabled.
Does anyone have a solution, information, tutorial or starting point to look for a solution?
Solved, wow, i always miss the the most simplistic reasons. So I used that as a premise to start my problem solving process over and found the problem.
so what have been your solution? If you change the GameData leash settings the game will start to lag pretty soon pretty bad with alot of units.
@FunkyUserName: Go
Indeed, leash settings. It seems if the unit object leash settings are set to -1, then it uses the max leash allowed by GameData. My current thoughts are to use leash of 50, and reduce incrementally based on lag level.
And yes again, lag will be terrible if you go max. No, I don't have an alternative to this solution, except to not use leash and instead, rely on behavior, scan, issue order with validators to avoid un-necessary scans.
Soooo, if anyone has an alternative solution to manipulate general unit actions, please chime in.
the best performing solution is done with triggers. basically have a unit group of possible targets, a unit group of units that need a target, then iterate over the attacking units, get lowest distance, issue order to attack closest unit.