I am currently working on an RTS project, and using the SC2 Editor to simulate/test some of the units while our engine/development tools are underway.
I'm trying to create a unit that has turrets on either side of it. I've put one on the left and one on the right, with 90 degree arcs, facing 50 and -50 degrees respectively. This leaves a 10 degree gap in front with no coverage. The idea is that the unit needs to charge in headlong in order to utilize its full DPS. Using a naive approach (just attaching the turrets, giving them weapons, and testing the unit) causes the unit to only attack with one turret at a time. However, when moving, (I enabled fire while moving and all that stuff) it will fire both attacks as intended. This leads me to believe it is an issue with targeting, and the other turret is just not firing because the targeted unit is outside of its coverage. When moving, there is no target, and the turrets fire freely.
How might I get the unit to function properly while stationary? I want to make sure that each turret only attacks units within its coverage, and the coverage of the two turrets is intentionally not overlapping.
This much I have done, there's no backswing or linked cooldown. The unit fires exactly as intended while moving, so all of the flags necessary for that to happen are checked appropriately. Only fire at attack target is also disabled. I will check out the Gorgon, although it is always moving so it may be the same thing. I'm not sure about the Goliath, my internet is quite slow atm and I don't have the Liberty Campaign Dependency downloaded, but my next plan is to find out more about that. I'll post again if I find something.
I had the idea to try doing an area search upon firing that would line up perfectly with the ranges of the turrets. I could put a marker on each of the units found in this search and have it to retarget looking for unflagged units. Unfortunately my knowledge of the sc2 editor is quite lacking so I'm not sure how to actually execute this idea. For instance, doing an arc shaped area search at an angle off to side of the unit.
The only other thing I can think of that would cause such an issue is the Default Acquire Level (in the unit tab) being set to something other than "offensive".
Else, PM me the map if you like (with triggers/imported data removed), and I'll PM back what's causing it.
That wasn't the problem, but you led me to something interesting. The default acquire stance was set to offensive. However, when I set it to any of the other settings (passive, defensive, none) the units will now fire both turrets if they are set to hold position (still not when they are on attack move or given a target). If I am analyzing this right, the attack move is setting them to "offensive" acquire behavior which is preventing them from using both turrets at the same time because it is telling both turrets to attack the unit's target, and the turrets are set up for no overlapping coverage, making this impossible. When on "Defensive" or "Passive" the turrets are both able to fire at their own targets. Pressing hold position is causing them to revert to what is set for the default behavior.
Is it possible to make a modified "attack" ability that will cause them to use "defensive" or "passive" target acquisition while on attack move? Or do I have this totally bassackwards?
At any rate I really appreciate the help, as well as the offer to look at the map. If this continues to stonewall me I might take you up on it.
The Gorgon does have multiple range-limited turrets, but the weapons on those turrets have 360 degree firing arcs. It appears to use markers to limit the number of guns firing at once, I'm not sure on the specifics though, as I don't understand the markers that well. Under most circumstances it appears to only shoot with the turret pointing at a particular unit, but if you clump units together the turrets will start alternating fire, using turrets not pointing at your clump of units (but not firing any faster than one turret would). Markers might be able to solve the problem but most of my attempts to use them (and buffs) didn't work.
The diamondback also has a 360 degree firing arc, so it's pretty standard stuff and not subject to the problems I'm having.
I managed to create a makeshift solution by just adding a Hold Position command to the Effect Set called by the weapon. Together with the Defensive default target acquisition stance and a No Flee damage response, they will stop and start firing both weapons as soon as they are in range. I can then micro them around with move commands and they will stay where they were put and keep attacking. I'm not even going to try to make them turn to get both turrets in range, but it's important that I can keep them attacking effectively without epic micro, because I'm trying to test weapon damage/fire rate/armor match-ups. If a unit is firing way less than it would in the real engine, the test results would be very skewed.
I'm still interested in a more solid solution though. Is there any way to, for instance, modify the stock "Attack" ability to use a different default target acquisition stance? Considering that moving and holding with a defensive default stance work fine, it seems like Attack is at the root of the problem.
I am currently working on an RTS project, and using the SC2 Editor to simulate/test some of the units while our engine/development tools are underway.
I'm trying to create a unit that has turrets on either side of it. I've put one on the left and one on the right, with 90 degree arcs, facing 50 and -50 degrees respectively. This leaves a 10 degree gap in front with no coverage. The idea is that the unit needs to charge in headlong in order to utilize its full DPS. Using a naive approach (just attaching the turrets, giving them weapons, and testing the unit) causes the unit to only attack with one turret at a time. However, when moving, (I enabled fire while moving and all that stuff) it will fire both attacks as intended. This leads me to believe it is an issue with targeting, and the other turret is just not firing because the targeted unit is outside of its coverage. When moving, there is no target, and the turrets fire freely.
How might I get the unit to function properly while stationary? I want to make sure that each turret only attacks units within its coverage, and the coverage of the two turrets is intentionally not overlapping.
Try playing with the weapon flags such as the must fire at attack target one.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Specifically, uncheck "shared cooldown", "only fire at attack target" and set the backswing/firing point to 0.
Also see the Gorgon for reference. It has multiple, independent, arc-limited turrets parented to a single unit.
@TyaStarcraft: Go
This much I have done, there's no backswing or linked cooldown. The unit fires exactly as intended while moving, so all of the flags necessary for that to happen are checked appropriately. Only fire at attack target is also disabled. I will check out the Gorgon, although it is always moving so it may be the same thing. I'm not sure about the Goliath, my internet is quite slow atm and I don't have the Liberty Campaign Dependency downloaded, but my next plan is to find out more about that. I'll post again if I find something.
I had the idea to try doing an area search upon firing that would line up perfectly with the ranges of the turrets. I could put a marker on each of the units found in this search and have it to retarget looking for unflagged units. Unfortunately my knowledge of the sc2 editor is quite lacking so I'm not sure how to actually execute this idea. For instance, doing an arc shaped area search at an angle off to side of the unit.
The only other thing I can think of that would cause such an issue is the Default Acquire Level (in the unit tab) being set to something other than "offensive".
Else, PM me the map if you like (with triggers/imported data removed), and I'll PM back what's causing it.
@TyaStarcraft: Go
That wasn't the problem, but you led me to something interesting. The default acquire stance was set to offensive. However, when I set it to any of the other settings (passive, defensive, none) the units will now fire both turrets if they are set to hold position (still not when they are on attack move or given a target). If I am analyzing this right, the attack move is setting them to "offensive" acquire behavior which is preventing them from using both turrets at the same time because it is telling both turrets to attack the unit's target, and the turrets are set up for no overlapping coverage, making this impossible. When on "Defensive" or "Passive" the turrets are both able to fire at their own targets. Pressing hold position is causing them to revert to what is set for the default behavior.
Is it possible to make a modified "attack" ability that will cause them to use "defensive" or "passive" target acquisition while on attack move? Or do I have this totally bassackwards?
At any rate I really appreciate the help, as well as the offer to look at the map. If this continues to stonewall me I might take you up on it.
Check the diamond back weapons flags.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
The Gorgon does have multiple range-limited turrets, but the weapons on those turrets have 360 degree firing arcs. It appears to use markers to limit the number of guns firing at once, I'm not sure on the specifics though, as I don't understand the markers that well. Under most circumstances it appears to only shoot with the turret pointing at a particular unit, but if you clump units together the turrets will start alternating fire, using turrets not pointing at your clump of units (but not firing any faster than one turret would). Markers might be able to solve the problem but most of my attempts to use them (and buffs) didn't work.
The diamondback also has a 360 degree firing arc, so it's pretty standard stuff and not subject to the problems I'm having.
I managed to create a makeshift solution by just adding a Hold Position command to the Effect Set called by the weapon. Together with the Defensive default target acquisition stance and a No Flee damage response, they will stop and start firing both weapons as soon as they are in range. I can then micro them around with move commands and they will stay where they were put and keep attacking. I'm not even going to try to make them turn to get both turrets in range, but it's important that I can keep them attacking effectively without epic micro, because I'm trying to test weapon damage/fire rate/armor match-ups. If a unit is firing way less than it would in the real engine, the test results would be very skewed.
I'm still interested in a more solid solution though. Is there any way to, for instance, modify the stock "Attack" ability to use a different default target acquisition stance? Considering that moving and holding with a defensive default stance work fine, it seems like Attack is at the root of the problem.
meant the flags on the diamond back for the firing while moving and not at the attack target (or was that goliath?)
Have several attack abilities on the unit?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg