Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically rotate units with angle limits towards targets #6437

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/snippets/balance.6437.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- (#6437) Automatically rotate Cybran Carrier, Othuum, and Monkeylord towards their targets when idle or attacking so that all their weapons can fire.
- Monkeylord will not automatically rotate when the laser is firing, to make it get in the way of micro less.
BlackYps marked this conversation as resolved.
Show resolved Hide resolved
- The units rotate in place when aiming like this.
4 changes: 2 additions & 2 deletions engine/Core/Blueprints/WeaponBlueprint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@
---@field Flare WeaponBlueprintFlare
--- used to force packing up a weapon before being able to fire again
---@field ForceSingleFire? boolean
--- controls what the weapon is allowed to target in reference to the heading of the unit
--- controls what the weapon is allowed to target in reference to the heading of the unit. Defaults to 0
---@field HeadingArcCenter number
--- controls what the weapon is allowed to target in reference to the arc center,
--- this is degrees on either side
--- this is degrees on either side. Defaults to 180
---@field HeadingArcRange number
--- does not consider the weapon when attacking targets if it is disabled
---@field IgnoreIfDisabled? boolean
Expand Down
8 changes: 6 additions & 2 deletions units/URL0402/URL0402_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ UnitBlueprint{
RackSlavedToTurret = false,
RangeCategory = "UWRC_DirectFire",
RateOfFire = 10/1, --10/integer interval in ticks
SlavedToBody = true,
SlavedToBodyArcRange = 180,
TargetPriorities = {
"EXPERIMENTAL",
"SUBCOMMANDER",
Expand Down Expand Up @@ -378,7 +380,8 @@ UnitBlueprint{
RackSlavedToTurret = false,
RangeCategory = "UWRC_IndirectFire",
RateOfFire = 10/7, --10/integer interval in ticks
SlavedToBody = false,
SlavedToBody = true,
SlavedToBodyArcRange = 39,
TargetPriorities = {
"TECH1 MOBILE",
"TECH2 MOBILE",
Expand Down Expand Up @@ -444,7 +447,8 @@ UnitBlueprint{
RackSlavedToTurret = false,
RangeCategory = "UWRC_IndirectFire",
RateOfFire = 10/7, --10/integer interval in ticks
SlavedToBody = false,
SlavedToBody = true,
SlavedToBodyArcRange = 39,
TargetPriorities = {
"TECH1 MOBILE",
"TECH2 MOBILE",
Expand Down
8 changes: 8 additions & 0 deletions units/URS0303/URS0303_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ UnitBlueprint{
RackSlavedToTurret = true,
RangeCategory = "UWRC_AntiAir",
RateOfFire = 10/5, --10/integer interval in ticks
SlavedToBody = true,
SlavedToBodyArcRange = 27,
TargetPriorities = {
"NAVAL MOBILE",
"ALLUNITS",
Expand Down Expand Up @@ -310,6 +312,8 @@ UnitBlueprint{
RackSlavedToTurret = true,
RangeCategory = "UWRC_AntiAir",
RateOfFire = 10/5, --10/integer interval in ticks
SlavedToBody = true,
SlavedToBodyArcRange = 27,
TargetPriorities = {
"EXPERIMENTAL",
"AIR MOBILE TECH3 BOMBER",
Expand Down Expand Up @@ -377,6 +381,8 @@ UnitBlueprint{
RackSlavedToTurret = true,
RangeCategory = "UWRC_AntiAir",
RateOfFire = 10/5, --10/integer interval in ticks
SlavedToBody = true,
SlavedToBodyArcRange = 27,
TargetPriorities = {
"EXPERIMENTAL",
"AIR MOBILE TECH3 BOMBER",
Expand Down Expand Up @@ -444,6 +450,8 @@ UnitBlueprint{
RackSlavedToTurret = true,
RangeCategory = "UWRC_AntiAir",
RateOfFire = 10/5, --10/integer interval in ticks
SlavedToBody = true,
SlavedToBodyArcRange = 27,
TargetPriorities = {
"EXPERIMENTAL",
"AIR MOBILE TECH3 BOMBER",
Expand Down
4 changes: 4 additions & 0 deletions units/XSL0303/XSL0303_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ UnitBlueprint{
RackSlavedToTurret = false,
RangeCategory = "UWRC_DirectFire",
RateOfFire = 10/5, --10/integer interval in ticks
SlavedToBody = true,
SlavedToBodyArcRange = 44,
TargetPriorities = {
"TECH3 MOBILE",
"TECH2 MOBILE",
Expand Down Expand Up @@ -310,6 +312,8 @@ UnitBlueprint{
RackSlavedToTurret = false,
RangeCategory = "UWRC_DirectFire",
RateOfFire = 10/5, --10/integer interval in ticks
SlavedToBody = true,
SlavedToBodyArcRange = 44,
TargetPriorities = {
"TECH3 MOBILE",
"TECH2 MOBILE",
Expand Down
2 changes: 0 additions & 2 deletions units/XSS0103/XSS0103_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ UnitBlueprint{
FireTargetLayerCapsTable = { Water = "Air" },
FiringRandomness = 0,
FiringTolerance = 1,
HeadingArcCenter = 0,
HeadingArcRange = 360,
Label = "AntiAir",
MaxRadius = 48,
MuzzleSalvoDelay = 0,
Expand Down
Loading