beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
207 stars 98 forks source link

Make `maxRange` work on weaponless units #1300

Open sprunk opened 7 months ago

sprunk commented 7 months ago

Spring.SetUnitMaxRange(unitID, number) sets a unit's engagement range. It controls how close a unit will walk up to enemies. You can make sure a unit with multiple weapons walks to an optimal range without getting confused by sidearms with different ranges.

It would be good if this worked regardless of whether the unit actually has any weapons. This way utility units (radar truck etc) on a fight command would be able to be configured to stop alongside other combat units and not drive into the enemy.

TheSilverHornet commented 7 months ago

For context, this is for a less hacky and side effect prone way to do something I've prototyped using fake weapons, which GDT already seem to approve (2 views not in yet but already 3 in favour)