Right now my ability is copied from the load-unload bunker ability, and the vehicle also uses attack and attack redirect. But it does not allow me to have the units inside the vehicle attack while it is moving.
I need to find a way to make the units inside attack while moving, without changing their weapons to allow movement.
If I remember correctly, when I did this I did have to change the weapons. So there's two versions of each unit's weapon, and a behavior is applied when they are loaded up that disables the default weapon and enables the weapon that attacks while moving. Despite this, targets are not always acquired while moving; often one has to order the transport to stop, then the attacking begins, and the transport can start moving again. It might be possible to fix this using a behavior that searches for targets, but I'm too lazy.
A "Buff" type behavior applied as the "cargo behavior" on the load ability. Under Modification+ set it to Deactivate the default weapons of all loadable units, and to Activate the fire-while-moving variants. Give both weapon types to the units in question, but make sure the fire-while-moving one is Hidden and Deactivated by default. You might have to give the weapons a 360° firing arc or mount them on a "freely rotating" turret.
You -should- be able to pack the search in the same behavior. Buff behaviors can emulate a unit-centered persistent effect by default. Make a Search Area effect with a validator "Source(or Caster?) not Attacking(checks use of the Attack ability)", set "max targets" to 1, and apply an Issue Order effect "Source: Attack Target". All location types should be "Unit", not "Point/Unit" or "Point". You can also use "target sorting methods" on the Search Area effect to set target priorities (proximity, HP, %HP etc.)
Hey, i must say in the past i have spent a few days with the same problem and eventually didn't get it to work. The only way i got it to work is if the vehicle isn't moving, the other way i sorta got it to work is adding the weapon of the unit that loads in to the vehicle to the weapons of the vehicle itself and remove whenever he leaves, but this is a pretty awful workaround. And believe me i have cracked my skull over it. So if you actually get it to work i would like to know how!
All you have to do is make the cargo buff activate the Attack ability and/or Attack ability class. No turrets, no periodic searches, nothing. FACEPALM
You don't even need to enable the "fire while moving" flag apparently, the relevant flags are "only fire on attack target" and "only fire while attacking" MUST BE OFF! (exact wording may vary, I'm German); the "Legacy Options" "no slowdown" and "can aquire new targets while channeling" may also be required ON for certain weapons (they're enabled on the voidray, but aren't required for the marine's gauss gun to work)
I don't know exactly what these flags control, but even with both OFF marines won't attack when ordered to walk past a target. I can't be bothered to test this right now, but you might get away with simply disabling these on the default weapons.
This may render the unit immune to stuns/stasis depending on the games' internal priority list, so you might have to ensure all stuns also reliably disable the Attack ability (-class)
I only discovered it by accident, I was trying to activate Attack Redirect while moving (note the icon is greyed out when the transport moves, if it has one). Then I though hey - why can't I just force-activate the attack of the cargo?
One more thing, the attack launches from the Center/Origin point of the transport, including launch graphics, as a fallback if the transport doesn't have "container attack launch" hardpoints. So you either have to add those to the transport or really dupe all weapons to disable crazy launch graphics.
Right now my ability is copied from the load-unload bunker ability, and the vehicle also uses attack and attack redirect. But it does not allow me to have the units inside the vehicle attack while it is moving.
I need to find a way to make the units inside attack while moving, without changing their weapons to allow movement.
Does anyone know how to get this done?
@Vietman: Go
If I remember correctly, when I did this I did have to change the weapons. So there's two versions of each unit's weapon, and a behavior is applied when they are loaded up that disables the default weapon and enables the weapon that attacks while moving. Despite this, targets are not always acquired while moving; often one has to order the transport to stop, then the attacking begins, and the transport can start moving again. It might be possible to fix this using a behavior that searches for targets, but I'm too lazy.
@TrenchaunT: Go
Do you know what kind of behavior would fit in to solve this problem?
A "Buff" type behavior applied as the "cargo behavior" on the load ability. Under Modification+ set it to Deactivate the default weapons of all loadable units, and to Activate the fire-while-moving variants. Give both weapon types to the units in question, but make sure the fire-while-moving one is Hidden and Deactivated by default. You might have to give the weapons a 360° firing arc or mount them on a "freely rotating" turret.
You -should- be able to pack the search in the same behavior. Buff behaviors can emulate a unit-centered persistent effect by default. Make a Search Area effect with a validator "Source(or Caster?) not Attacking(checks use of the Attack ability)", set "max targets" to 1, and apply an Issue Order effect "Source: Attack Target". All location types should be "Unit", not "Point/Unit" or "Point". You can also use "target sorting methods" on the Search Area effect to set target priorities (proximity, HP, %HP etc.)
@Vietman: Go
Hey, i must say in the past i have spent a few days with the same problem and eventually didn't get it to work. The only way i got it to work is if the vehicle isn't moving, the other way i sorta got it to work is adding the weapon of the unit that loads in to the vehicle to the weapons of the vehicle itself and remove whenever he leaves, but this is a pretty awful workaround. And believe me i have cracked my skull over it. So if you actually get it to work i would like to know how!
http://www.sc2mapster.com/forums/development/data/33170-drive-by-shooting/#p12
good luck
Lol, I got it to work.
All you have to do is make the cargo buff activate the Attack ability and/or Attack ability class. No turrets, no periodic searches, nothing. FACEPALM
You don't even need to enable the "fire while moving" flag apparently, the relevant flags are "only fire on attack target" and "only fire while attacking" MUST BE OFF! (exact wording may vary, I'm German); the "Legacy Options" "no slowdown" and "can aquire new targets while channeling" may also be required ON for certain weapons (they're enabled on the voidray, but aren't required for the marine's gauss gun to work)
I don't know exactly what these flags control, but even with both OFF marines won't attack when ordered to walk past a target. I can't be bothered to test this right now, but you might get away with simply disabling these on the default weapons.
This may render the unit immune to stuns/stasis depending on the games' internal priority list, so you might have to ensure all stuns also reliably disable the Attack ability (-class)
@Photoloss: Go
Wow you make it sound so easy, wonder why no one posted that solution in my previous post about it -.-
No one fiddles with core abilities I guess?
I only discovered it by accident, I was trying to activate Attack Redirect while moving (note the icon is greyed out when the transport moves, if it has one). Then I though hey - why can't I just force-activate the attack of the cargo?
One more thing, the attack launches from the Center/Origin point of the transport, including launch graphics, as a fallback if the transport doesn't have "container attack launch" hardpoints. So you either have to add those to the transport or really dupe all weapons to disable crazy launch graphics.
Sounds like an Action actor issue. Thought bunkers had some container based values for overriding that.
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