Its not that easy, actually. You would need a way to apply the behaviors to the units on spawn. You could do so via trigger or with spawn effects. Also, if you want to use actual upgrade objects, you need some dummy upgrades doing nothing, and some means of applying behavior stacks dependant of the current upgrade level.
If you only apply the behaviors on unit creation, it won't be affected by any further upgrades.
Definitely possible, but not that trivial like adding a behavior to the upgrade.
You could try a persistent effect, flagged as persist until destroyed, add a periodic validator, which checks a requirement comparing the current stack of the behavior to your upgrade level.
The periodic effect would apply 1 stack of the desired behavior, which lasts indefinitely and provides the modifications to the unit. Make sure the behavior is stackable.
The persistent effect would continue to apply behavior stacks, until it matches the requirement; then it breaks up.
Does this make sense to you? Alternatively, you can apply the behaviors via trigger, might be easier.
Ok I think for now I'll just create separate copies of units and weapons to have abilities applied to until I understand behaviours better. Thanks for your help.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is it possible to have a newly researched upgrade only be applied to units trained after the research, so current units are not upgraded?
Not when using "real" upgrades, I think. You could use behaviors and apply those to newly created units.
Thanks, I've never used behaviours before.
So I would I be able to link a behaviour to an upgrade. Then when a unit is trained it receives the current behaviour bonuses?
And if the behaviour is updated through more upgrades being researched, it will not change on units already created?
Its not that easy, actually. You would need a way to apply the behaviors to the units on spawn. You could do so via trigger or with spawn effects. Also, if you want to use actual upgrade objects, you need some dummy upgrades doing nothing, and some means of applying behavior stacks dependant of the current upgrade level.
If you only apply the behaviors on unit creation, it won't be affected by any further upgrades.
Definitely possible, but not that trivial like adding a behavior to the upgrade.
You could try a persistent effect, flagged as persist until destroyed, add a periodic validator, which checks a requirement comparing the current stack of the behavior to your upgrade level.
The periodic effect would apply 1 stack of the desired behavior, which lasts indefinitely and provides the modifications to the unit. Make sure the behavior is stackable.
The persistent effect would continue to apply behavior stacks, until it matches the requirement; then it breaks up.
Does this make sense to you? Alternatively, you can apply the behaviors via trigger, might be easier.
Ok I think for now I'll just create separate copies of units and weapons to have abilities applied to until I understand behaviours better. Thanks for your help.