I've ran into an issue with the train ability. I'm trying to recreate how goblin camps worked in WC3. A unit would have an initial stock delay, then after that there was a different interval to replenish the unit. It seems like the train ability is capable of this, but it's like bugging out on me.
In the ability, I have the "Charge - Time Start" set to 60 seconds. The "Charge - Time Use" is 10. Max of 10 charges, uses 1 charge per trained unit. This to me seems like it would take 60 seconds for the first charge to come, and every 10 seconds the unit charge is replenished +1. This is mostly what happens, but for some reason after a unit is trained, it waits 60 seconds again before the 2nd charge becomes available. Then it starts to work correctly replenishing the units every 10 seconds... So, what am I doing wrong here?
Odd, sure it is not 70 secs because at one stage there were issues with the charge replenish times. Used to be the start was time taken to recharge and the use was the increment.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
How I initially set it up is in a pic below. What happens is when that first zealot becomes available, it waits the 60 seconds all over again before replenishing the unit to a 2nd count. After that, the 10 seconds works properly and every unit after that. I've tried moving around every single value, switching time use for start, cooldowns, etc.. But cooldown I realized doesn't work how I want it to. It will start replenishing stock immediately without Time Start. I got it to work the way I wanted to with triggers, but this is an ugly method especially if there ends up being 150-200 of this running at once. Unfortunately I might go with it anyway because the Data option just isn't working...
Sorry if the bullets makes the post look too long, it's easier to understand it this way.
TestTimeTrig
Events
- Timer - Elapsed time is 0.01 Game Time seconds
Local Variables
Conditions
Actions
- Unit - Clear charge regen time for charge Zealot on unit Barracks[1]
- Unit - Add 60.0 seconds to charge regen time for charge Zealot on unit Barracks[1]
- Aftter 60.25 seconds set charge Zealot on unit Barracks[1] to 10.0 seconds.
I'm hoping the quarter of a second won't be too noticeable. And the action def to set the delay.
SetChargeTime
Options: Action, Create Thread
Return Type: (None)
Parameters
- Delay = 0.0 <Real>
- Time = 0.0 <Real>
- Link <Charge Link>
- u = No Unit <Unit>
Grammar Text: Aftter Delay seconds set charge Link on unit u to Time seconds.
Hint Text: (None)
Custom Script Code
Local Variables
Actions
- General - Wait Delay Game Time seconds
- Unit - Clear charge regen time for charge Link on unit u
- Unit - Add Time seconds to charge regen time for charge Link on unit u
I've ran into an issue with the train ability. I'm trying to recreate how goblin camps worked in WC3. A unit would have an initial stock delay, then after that there was a different interval to replenish the unit. It seems like the train ability is capable of this, but it's like bugging out on me.
In the ability, I have the "Charge - Time Start" set to 60 seconds. The "Charge - Time Use" is 10. Max of 10 charges, uses 1 charge per trained unit. This to me seems like it would take 60 seconds for the first charge to come, and every 10 seconds the unit charge is replenished +1. This is mostly what happens, but for some reason after a unit is trained, it waits 60 seconds again before the 2nd charge becomes available. Then it starts to work correctly replenishing the units every 10 seconds... So, what am I doing wrong here?
Odd, sure it is not 70 secs because at one stage there were issues with the charge replenish times. Used to be the start was time taken to recharge and the use was the increment.
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
How I initially set it up is in a pic below. What happens is when that first zealot becomes available, it waits the 60 seconds all over again before replenishing the unit to a 2nd count. After that, the 10 seconds works properly and every unit after that. I've tried moving around every single value, switching time use for start, cooldowns, etc.. But cooldown I realized doesn't work how I want it to. It will start replenishing stock immediately without Time Start. I got it to work the way I wanted to with triggers, but this is an ugly method especially if there ends up being 150-200 of this running at once. Unfortunately I might go with it anyway because the Data option just isn't working...
Sorry if the bullets makes the post look too long, it's easier to understand it this way.
I'm hoping the quarter of a second won't be too noticeable. And the action def to set the delay.
Tried setting location to Unit?
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