I'm looking to make a passive ability for a building, that will automatically repair the building whenever its _not_ under attacked (approx. 3 sec delay). I cant seem to find a proper validator for it, whats the easiest way of solving this?
to be clear - its the "fire suppression" behavior from the campaign and i want the little flying robots to be active only during downtime.
Just off the top of my head, you could maybe add a behavior "Repair if not attacked" to the building with duration 3, with effect-final to be your repair effect, and, in "damage response", set the handler to be a set that removes the behavior and applies it again, to refresh the duration. The repair itself would need to be a similar behavior where it would periodically repair, but apply the repair if not attacked behavior as a damage response. (I'm not entirely sure if that's how the repair ability works, I haven't used the repair ability yet)
You could also add the repair behavior to the unit and use the NotInCombat - Validator (or similar) as a disable-validator. If you need a more specific timeframe, you can change it when editing the validator, I believe.
it has to have some kind of unit is below 20% health validator. create a validator set and add a nont in combat validator. this should mke the repair only start if below x hp and out of combat
or add a periodic behavior to check the combat status. whenever it is in combat it removes the repair behavior and adds a no-repair behavior with3 sec duration. the expire effect of the no-repair behavior should add the repair behavior
I'm looking to make a passive ability for a building, that will automatically repair the building whenever its _not_ under attacked (approx. 3 sec delay). I cant seem to find a proper validator for it, whats the easiest way of solving this?
to be clear - its the "fire suppression" behavior from the campaign and i want the little flying robots to be active only during downtime.
Just off the top of my head, you could maybe add a behavior "Repair if not attacked" to the building with duration 3, with effect-final to be your repair effect, and, in "damage response", set the handler to be a set that removes the behavior and applies it again, to refresh the duration. The repair itself would need to be a similar behavior where it would periodically repair, but apply the repair if not attacked behavior as a damage response. (I'm not entirely sure if that's how the repair ability works, I haven't used the repair ability yet)
You could also add the repair behavior to the unit and use the NotInCombat - Validator (or similar) as a disable-validator. If you need a more specific timeframe, you can change it when editing the validator, I believe.
it has to have some kind of unit is below 20% health validator. create a validator set and add a nont in combat validator. this should mke the repair only start if below x hp and out of combat
or add a periodic behavior to check the combat status. whenever it is in combat it removes the repair behavior and adds a no-repair behavior with3 sec duration. the expire effect of the no-repair behavior should add the repair behavior