I'm trying to create a trigger or otherwise alter a unit so that it will automatically attack nearby enemy units while moving. I want it to fire a weapon without having to stop or ordering the unit to attack. Warships might be a good example of this, but obviously without placing a building on the unit. Is this possible? Much thanks for any help!
Usually, all you need to do is change some flags for the weapon. Uncheck the Only fire while attacking and Only fire at attack target flags, set the Allowed Movement to Moving and set the Arc to 360 (or at least > 0, so it can attack in a limited arc while moving, similar to the Void Ray).
However, this purely affects the weapon, the animation will not be affected and might look weird. For example, if you just do the above for the Marine weapon, it will fire on the move, but it won't face the target of the attack, and you could either let it play the attack animation (which won't move the legs, so he kind of slides while firing) or the walk animation (which won't raise his gun).
Depending on your kind of unit and weapon, you might need a turret object, attached actors or even edited models to get your desired result. Also, you might need to modify the actor events of the unit model. I cannot give you specific advice here, since I do not now exactly, how you want the end result to look like.
I actually just noticed that this method does not work for the weapon "Carrier - Interceptor Launch". Is that going to be more complicated? Sorry for asking another question after saying my issue was solved =/
Actually the carrier weapon does not need the persistent. As for the voidray you can make it not require the channel but would need to add validators to stop it always powering up even if the unit moves out of range.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I am actually having the same issue with the carrier thing. I cannot get the carrier to auto launch it's fighters when its in a move command. You have to stop, and/or give the attack command.
I'm trying to create a trigger or otherwise alter a unit so that it will automatically attack nearby enemy units while moving. I want it to fire a weapon without having to stop or ordering the unit to attack. Warships might be a good example of this, but obviously without placing a building on the unit. Is this possible? Much thanks for any help!
@ArchonTheWizard: Go
I also tried the same thing but I have failed I will continue this thread
It´s in the definition of the weapon I think, try to inspire from the diamondsback
I think it has to do with turret attachments. Look into that.
Usually, all you need to do is change some flags for the weapon. Uncheck the Only fire while attacking and Only fire at attack target flags, set the Allowed Movement to Moving and set the Arc to 360 (or at least > 0, so it can attack in a limited arc while moving, similar to the Void Ray).
However, this purely affects the weapon, the animation will not be affected and might look weird. For example, if you just do the above for the Marine weapon, it will fire on the move, but it won't face the target of the attack, and you could either let it play the attack animation (which won't move the legs, so he kind of slides while firing) or the walk animation (which won't raise his gun).
Depending on your kind of unit and weapon, you might need a turret object, attached actors or even edited models to get your desired result. Also, you might need to modify the actor events of the unit model. I cannot give you specific advice here, since I do not now exactly, how you want the end result to look like.
@Kueken531: Go
I think he means my turret simulation map for some of those points.
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
Wow, thank you guys so much. Especially Kueken! I'll start playing around with those settings - you've pointed me in the right direction =)
So solved?
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
Solved indeed, it worked great. I've been playing around with turrets as well, but they're definitely more complicated =P Thanks again for the help
I actually just noticed that this method does not work for the weapon "Carrier - Interceptor Launch". Is that going to be more complicated? Sorry for asking another question after saying my issue was solved =/
The carrier weapon is channelled so moving breaks the channel.
Voidrays should also give issues.
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
That makes sense. Is there a way to avoid interrupting the channel? Can it channel the spell while moving? Thanks for the help
Actually the carrier weapon does not need the persistent. As for the voidray you can make it not require the channel but would need to add validators to stop it always powering up even if the unit moves out of range.
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
So is it possible to cause the Lauch Inteceptors weapon to auto attack while the unit with the weapon is moving?
Yup. No clue why carrier uses a persistent. The ammo units only return when the attack ability stops targeting.
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
I am actually having the same issue with the carrier thing. I cannot get the carrier to auto launch it's fighters when its in a move command. You have to stop, and/or give the attack command.
Hmm so the ability is not transient? You might have to simulate the ability then which is not a simple workaround.
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
Two solved threads about fire on the move:
1) http://www.sc2mapster.com/forums/development/data/28590-fire-on-the-move-solved/
2) http://www.sc2mapster.com/forums/development/data/36559-units-shooting-from-inside-other-unit-on-the-move-apc/