An ability at the Orbital Command applies a buff to a Terran production structure. That structure can now produce 2 units at the same time. (Like a Reactor) As soon as it starts to produce 2 units, and one of them finishes, the buff is removed. So the structure can only produce 1 unit again. This buff is basically a one-time-Reactor that lasts forever, or until it is used once.
How can the buff be removed after 2 units have started being produced? Any way to make a trigger who checks for this?
One small problem though: The trigger does not always work. Sometimes a structure can keep producing 2 units on and on at the same time for a long time. Then all of a sudden the buff is removed. The thought of the buff is that it shall work as a "one-time-reactor" and be removed as soon as one the two produced units finishes. Sometimes it works!
I have tried a lot of combinations: First produce 2 units, then drop the buff on the structure. Drop the buff first, then produce 2 units. Queue up 3 units. Queue up 4 units. I canĀ“t find a pattern. Sometimes the buff is removed. Sometimes it is not.
Any idea what causes this inconsistency?
I upload the MOD-file where the trigger is added. Feel free to create a new test map, add the mod as a dependencie, place an Orbital command, some resources and a barrack. The ability is called Overcharge on the Orbital.
I wasn't able to test it the first time without the behavior so it was really just hypothetical. With the mod, I was able to fix it and fine tune it.
Wasn't sure if you wanted players to be able to cancel a unit before the first was produced and keep the buff so I included it anyway. Let me know if you want me to get rid of that.
It works much better now. I tried it in a lot of situations and combinations. There is only one small leak: If 3-4 SCVs are in queue, and the first of them only has a few seconds left before it is finished, and I drop Overcharge at that point, sometimes the buff is removed as soon as the first SCV finishes. Sometimes it lasts through another production cycle.
This macro mechanics can be used at two different scenarios:
1. Before any production has started in the building. So T can use Overcharge, and immediately start to produce 2 units of any kind.
2. When one unit already is in production, and other units are queued. Depending on when T uses Overcharge, he will gain a small or large bonus from the effect, since it cancels as soon as the first unit finishes. Kinda like Chrono boost. If P uses it when an upgrade only has 5 seconds left, the remaining Chrono boost is wasted.
If T uses Overcharge on a structure, and always keeps producing only one unit at a time, without adding anything to the queue, the buff will potentially last forever. If he produces 2 units at the same time, and cancels one of them near the end, the buff will still remain. Since T gets no bonus from this anyway? (So he/she can not cheat on the system)
Is there anyway to fix the small leak that sometimes happen?
Or maybe that can become a feature? For example, if a unit finishes within 5 seconds after Overcharge is used, it will also start producing the next unit in queue. (If that is easier for you to make.) As long as it is consistent, I am happy.
Ps. This will replace the ordinary Reactor in my mod. So each races gets a macro mechanic that requires APM and focus on the base. (Chrono boost, Inject and Overcharge)
If T uses Overcharge on a structure, and always keeps producing only one unit at a time, without adding anything to the queue, the buff will potentially last forever. If he produces 2 units at the same time, and cancels one of them near the end, the buff will still remain. Since T gets no bonus from this anyway? (So he/she can not cheat on the system)
I did this intentionally. I figured this made the most sense, given that if the player decides not to go through with a unit and cancels it for a refund, the buff is not wasted. If you don't want it like this, just say so.
It works much better now. There is only one small leak: If 3-4 SCVs are in production, and the first of them only has a few seconds left before it is finished, and I drop Overcharge at that point, sometimes the buff is removed as soon as the first SCV finishes. Sometimes it lasts through another production cycle.
Working as intended. Unless when multiple units are queued, and one has just started and the buff is applied, for it to not be removed when that unit finishes, and the buff lasts through three units total. As for the sometimes part, are you sure you're not just applying it before/after the unit finishes?
I did this intentionally. I figured this made the most sense, given that if the player decides not to go through with a unit and cancels it for a refund, the buff is not wasted. If you don't want it like this, just say so.
Working as intended. Unless when multiple units are queued, and one has just started and the buff is applied, for it to not be removed when that unit finishes, and the buff lasts through three units total. As for the sometimes part, are you sure you're not just applying it before/after the unit finishes?
I tried it again. If I drop Overcharge when the SCV has 2-3 seconds left before it finishes, and there are more SCVs in que, sometimes it lasts through 3 units. Sometimes the buff is removed immediately when the SCV finishes. I think it is fair that it can last through 3 units if it is dropped very close to the end. But if it happens "randomly", players will probably be angry since it feels like bad luck. Try it you too if you want. Something similar occurs for you?
Fixed it. The problem was that the finish trigger wasn't running because it's event wasn't being triggered. I wasted like 20 minutes of my time because I was tinkering with the wrong trigger and didn't realize it. ;p
Anyway, swap out the event in the trigger "Unit Group Finish" from whatever it is now to Unit - Any Unit training progress is Completed.
An ability at the Orbital Command applies a buff to a Terran production structure. That structure can now produce 2 units at the same time. (Like a Reactor) As soon as it starts to produce 2 units, and one of them finishes, the buff is removed. So the structure can only produce 1 unit again. This buff is basically a one-time-Reactor that lasts forever, or until it is used once.
How can the buff be removed after 2 units have started being produced? Any way to make a trigger who checks for this?
@Kabelkorven: Go
Didn't feel like writing up an explanation so I just made it for you.
Insert your behavior in the variable where it says to and you should be good.
Thank you!
One small problem though: The trigger does not always work. Sometimes a structure can keep producing 2 units on and on at the same time for a long time. Then all of a sudden the buff is removed. The thought of the buff is that it shall work as a "one-time-reactor" and be removed as soon as one the two produced units finishes. Sometimes it works!
I have tried a lot of combinations: First produce 2 units, then drop the buff on the structure. Drop the buff first, then produce 2 units. Queue up 3 units. Queue up 4 units. I canĀ“t find a pattern. Sometimes the buff is removed. Sometimes it is not.
Any idea what causes this inconsistency?
I upload the MOD-file where the trigger is added. Feel free to create a new test map, add the mod as a dependencie, place an Orbital command, some resources and a barrack. The ability is called Overcharge on the Orbital.
Edit: The file is 11 mb. SC2mapster has a upload limit of 10 mb. T_T I use speedyshare instead. http://speedy.sh/4JsUf/Starbow-HotS-Final.SC2Mod
@Kabelkorven: Go
I wasn't able to test it the first time without the behavior so it was really just hypothetical. With the mod, I was able to fix it and fine tune it.
Wasn't sure if you wanted players to be able to cancel a unit before the first was produced and keep the buff so I included it anyway. Let me know if you want me to get rid of that.
Thank you a lot for your help!
It works much better now. I tried it in a lot of situations and combinations. There is only one small leak: If 3-4 SCVs are in queue, and the first of them only has a few seconds left before it is finished, and I drop Overcharge at that point, sometimes the buff is removed as soon as the first SCV finishes. Sometimes it lasts through another production cycle.
This macro mechanics can be used at two different scenarios:
1. Before any production has started in the building. So T can use Overcharge, and immediately start to produce 2 units of any kind.
2. When one unit already is in production, and other units are queued. Depending on when T uses Overcharge, he will gain a small or large bonus from the effect, since it cancels as soon as the first unit finishes. Kinda like Chrono boost. If P uses it when an upgrade only has 5 seconds left, the remaining Chrono boost is wasted.
If T uses Overcharge on a structure, and always keeps producing only one unit at a time, without adding anything to the queue, the buff will potentially last forever. If he produces 2 units at the same time, and cancels one of them near the end, the buff will still remain. Since T gets no bonus from this anyway? (So he/she can not cheat on the system)
Is there anyway to fix the small leak that sometimes happen? Or maybe that can become a feature? For example, if a unit finishes within 5 seconds after Overcharge is used, it will also start producing the next unit in queue. (If that is easier for you to make.) As long as it is consistent, I am happy.
Ps. This will replace the ordinary Reactor in my mod. So each races gets a macro mechanic that requires APM and focus on the base. (Chrono boost, Inject and Overcharge)
I did this intentionally. I figured this made the most sense, given that if the player decides not to go through with a unit and cancels it for a refund, the buff is not wasted. If you don't want it like this, just say so.
Working as intended. Unless when multiple units are queued, and one has just started and the buff is applied, for it to not be removed when that unit finishes, and the buff lasts through three units total. As for the sometimes part, are you sure you're not just applying it before/after the unit finishes?
I agree with you. It makes the most sense.
I tried it again. If I drop Overcharge when the SCV has 2-3 seconds left before it finishes, and there are more SCVs in que, sometimes it lasts through 3 units. Sometimes the buff is removed immediately when the SCV finishes. I think it is fair that it can last through 3 units if it is dropped very close to the end. But if it happens "randomly", players will probably be angry since it feels like bad luck. Try it you too if you want. Something similar occurs for you?
Dude, I have my own projects to work on. Don't have time for this.
Kidding, I'll try it right now.
@Kabelkorven: Go
Fixed it. The problem was that the finish trigger wasn't running because it's event wasn't being triggered. I wasted like 20 minutes of my time because I was tinkering with the wrong trigger and didn't realize it. ;p
Anyway, swap out the event in the trigger "Unit Group Finish" from whatever it is now to Unit - Any Unit training progress is Completed.
EDIT: I TAKE IT BACK THAT DIDN'T FIX IT.
@Kabelkorven: Go
I wasn't able to fix it. It was an issue in which the data was triggering the events.
I made it so if the buff is applied with at most two seconds remaining on the first unit's build time, it will persist through three units.
Thanks a lot!
I will add your name to the credit list!
@Kabelkorven: Go
You're welcome. I hope your project turns out well!