so I saw some maps that a unit acts like a bunker, which means a unit can load terran infantry units and they can shot inside of the units while the units are moving. For example, I saw a medivac when units are loaded they can shot inside of the medivac when medivac flies around.
I gave units bunker load and unload and bunker attack ability but it seems like that isnt enough... anyone knows how to do this?
Yes that medivac you saw was from my map Heaven Besieged.
The fundamental problem is that the redirect attack type ability of a bunker cannot be used while moving.
I spent quite a bit of time trying to figure out how to enable it while moving and decided that this was just not possible.
So I went around the problem. There are actually 2 medivacs in HB. The visible one which moves around like a normal unit, and an invisible, invincible copy of it which never moves, but is periodically teleported to the location of the visible medivac. The invisible medivac is the one with the actual redirect attack ability, while the visible medivac has instead a dummy weapon just to let you issue the attack orders and whatnot.
Anyways implementing all this takes quite a bit of work and even then will never quite work perfectly. You need triggers to turn the orders given to the visible unit into orders for the invisible unit, and you need to make sure that the units loaded in the invisible unit match those loaded in the visible one. It took me awhile to get right and I'm not really sure whether it was worth it in the end =P.
If you want to see exactly how I did it, Heaven Besieged is unlocked and can be downloaded from battle.net using the editor.
I did some experimenting and apparently you can get loaded units to fire even with the attack - redirect button grayed out while moving if the units weapon is allowed to fire while moving and the weapon options Only Fire At Attack Target, Only Fire While Attacking, and Requires Enabled Attack Ability are all unchecked. At least I was able to get it to work with marauders. I am not sure if it has always been this way or if this only just now works.
So it should be possible to accomplish attack-while-moving-bunkers by simply giving every loadable unit a duplicate weapon with those flags unchecked and which validates to make sure that it will only fire when loaded or hidden or whatever.
However you would still need to solve the issue of how the player goes about ordering the loaded units to focus fire on a particular target while moving, since the attack-redirect button would be grayed out. Presumably this could be done with triggers.
Photoless apparently discovered the solution to this issue last year in this thread.
Basically just make a buff which enables the attack class of abilities. Make both an add and a remove behavior effect for this buff. Now change the transport ability of your APC so that the cargo load effect adds the buff and the cargo unload effect removes it. Now your APC will work while moving with most units. Fantastic! Good job Photoless!
Even though this very simple solution basically works we still need some polish. First we will need to give the APC a dummy weapon which does no damage so it will chase targets in the manner we expect. Also It would make the most sense if the range of this dummy weapon is the same as(or slightly less than) the lowest range of any unit housed within.
The second major control issue is properly handling any attack orders which are issued when we are outside of the range of some of our cargo units. What we want is for the APC to chase to within range, and then automatically issue an attack redirect on the target.
Anyways I intend to make a polished implementation for my map sometime this evening, and I will post it here.
This would require updating every unit weapon. However, it seems that the great majority of weapons just work right out of the box using Photoless's solution. At the time he reported that you had to uncheck some of the weapon flags for it to work, but this does not seem to be the case, at least not any more. So far only a few weapons seem to not work right away because of idiosyncracies... ie the diamondback weapon effect validates for some reason that the diamondback is not hidden...
Anyways I think we can just have the APC weapon effect issue the APC an order to redirect attack(in this case a copy of redirect attack which does not include self). So no trigger needed for that. However I think triggers will still ultimately be required for modifying the range of the APC to reflect the lowest range among the loaded units.
Ok. it took me longer than I thought it would, here is a preliminary, still a bit messy, implementation.
It appears to work with most every unit right out of the box.
In the end I had to use triggers for several things but they shouldn't run often enough to cause any performance issues.
Here is the cleaned up version. APCs should control more or less the same as diamondbacks.
The APC basic attack/move/stop abilities were replaced with custom ones so that the supporting triggers will fire only in response to APC events. This set up should result in minimal trigger lag.
so I saw some maps that a unit acts like a bunker, which means a unit can load terran infantry units and they can shot inside of the units while the units are moving. For example, I saw a medivac when units are loaded they can shot inside of the medivac when medivac flies around.
I gave units bunker load and unload and bunker attack ability but it seems like that isnt enough... anyone knows how to do this?
@kogits35: Go
Yes that medivac you saw was from my map Heaven Besieged.
The fundamental problem is that the redirect attack type ability of a bunker cannot be used while moving. I spent quite a bit of time trying to figure out how to enable it while moving and decided that this was just not possible.
So I went around the problem. There are actually 2 medivacs in HB. The visible one which moves around like a normal unit, and an invisible, invincible copy of it which never moves, but is periodically teleported to the location of the visible medivac. The invisible medivac is the one with the actual redirect attack ability, while the visible medivac has instead a dummy weapon just to let you issue the attack orders and whatnot.
Anyways implementing all this takes quite a bit of work and even then will never quite work perfectly. You need triggers to turn the orders given to the visible unit into orders for the invisible unit, and you need to make sure that the units loaded in the invisible unit match those loaded in the visible one. It took me awhile to get right and I'm not really sure whether it was worth it in the end =P.
If you want to see exactly how I did it, Heaven Besieged is unlocked and can be downloaded from battle.net using the editor.
I did some experimenting and apparently you can get loaded units to fire even with the attack - redirect button grayed out while moving if the units weapon is allowed to fire while moving and the weapon options Only Fire At Attack Target, Only Fire While Attacking, and Requires Enabled Attack Ability are all unchecked. At least I was able to get it to work with marauders. I am not sure if it has always been this way or if this only just now works.
So it should be possible to accomplish attack-while-moving-bunkers by simply giving every loadable unit a duplicate weapon with those flags unchecked and which validates to make sure that it will only fire when loaded or hidden or whatever.
However you would still need to solve the issue of how the player goes about ordering the loaded units to focus fire on a particular target while moving, since the attack-redirect button would be grayed out. Presumably this could be done with triggers.
Forget the above two posts completely.
Photoless apparently discovered the solution to this issue last year in this thread.
Basically just make a buff which enables the attack class of abilities. Make both an add and a remove behavior effect for this buff. Now change the transport ability of your APC so that the cargo load effect adds the buff and the cargo unload effect removes it. Now your APC will work while moving with most units. Fantastic! Good job Photoless!
Even though this very simple solution basically works we still need some polish. First we will need to give the APC a dummy weapon which does no damage so it will chase targets in the manner we expect. Also It would make the most sense if the range of this dummy weapon is the same as(or slightly less than) the lowest range of any unit housed within.
The second major control issue is properly handling any attack orders which are issued when we are outside of the range of some of our cargo units. What we want is for the APC to chase to within range, and then automatically issue an attack redirect on the target.
Anyways I intend to make a polished implementation for my map sometime this evening, and I will post it here.
Else the weapon of the APC applies a buff to the target that the unit weapons prioritize via target sorts.
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
This would require updating every unit weapon. However, it seems that the great majority of weapons just work right out of the box using Photoless's solution. At the time he reported that you had to uncheck some of the weapon flags for it to work, but this does not seem to be the case, at least not any more. So far only a few weapons seem to not work right away because of idiosyncracies... ie the diamondback weapon effect validates for some reason that the diamondback is not hidden...
Anyways I think we can just have the APC weapon effect issue the APC an order to redirect attack(in this case a copy of redirect attack which does not include self). So no trigger needed for that. However I think triggers will still ultimately be required for modifying the range of the APC to reflect the lowest range among the loaded units.
This is gonna sound stupid. But what aboouutt:
Unit enters vehicle, give vehicle weapon of that unit, enable to shoot while moving.
@Doubleclick123: Go
What you suggest would actually require quite a lot of work. Photoless's solution is much more elegant.
Agreed since your method would require a ton of different buffs unless you are using an item weapon system where the buffs are already there.
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
Ok. it took me longer than I thought it would, here is a preliminary, still a bit messy, implementation.
It appears to work with most every unit right out of the box. In the end I had to use triggers for several things but they shouldn't run often enough to cause any performance issues.
I will post another cleaned up version soon.
Here is the cleaned up version. APCs should control more or less the same as diamondbacks.
The APC basic attack/move/stop abilities were replaced with custom ones so that the supporting triggers will fire only in response to APC events. This set up should result in minimal trigger lag.