I'm working on a map with a hero that can spawn a few units. This hero has the ability to research an upgrade. My idea was to allow the unit to operate normally while researching, but only progress would be made while the unit is idle. If they entered combat, progress would pause until they were done. I tried looking into triggers and there is an action for unit progress. But it is only "set" progress.
Would making a trigger that captures the progress %, and resetting it to that % every 0.5-1 seconds (to prevent the bar from moving) be too taxing? The other option I thought of was making the whole research progress led by a trigger. Once the upgrade is chosen, a trigger would take over and offer the unit 5% progress for every X number of seconds the unit is idle. It would be Set progress to be current progress + 5.
Use the Passive Queue ability then make a behavior that modifies the time scale for queue abilities to 0.01, then give the behavior a validator that disables it when out of combat.
I'm working on a map with a hero that can spawn a few units. This hero has the ability to research an upgrade. My idea was to allow the unit to operate normally while researching, but only progress would be made while the unit is idle. If they entered combat, progress would pause until they were done. I tried looking into triggers and there is an action for unit progress. But it is only "set" progress.
Would making a trigger that captures the progress %, and resetting it to that % every 0.5-1 seconds (to prevent the bar from moving) be too taxing? The other option I thought of was making the whole research progress led by a trigger. Once the upgrade is chosen, a trigger would take over and offer the unit 5% progress for every X number of seconds the unit is idle. It would be Set progress to be current progress + 5.
Can anyone else think of a better way to do this?
Use the Passive Queue ability then make a behavior that modifies the time scale for queue abilities to 0.01, then give the behavior a validator that disables it when out of combat.
@RileyStarcraft: Go
edit: I had like 5 problems but I figured them out. Thanks for the help, it works perfectly now!