Okay, so I have a unit that is essentially a ghost that sets enemies on fire (gives them a behaviour) for a few seconds when it attacks them. To increase the effectiveness of this unit, I'd like it so it selects enemies that aren't already on fire over ones that are, in order to have the maximum number of enemies burning at any one time, as opposed to it just attacking the same burning unit over and over. I could just add a validator that checks if they have the behaviour, but then it wouldn't attack units that are on fire at all, and I just want it to prioritise ones that aren't.
I could do this with triggers and it would probably be cleaner, but I feel like a data based approach could work better overall and probably be more efficient. I'm not great with the data editor though, so if anyone could guide me as to how to do this I'd be very grateful :)
Also, just to complicate things a little more, I'd like this to be an upgrade for the unit if possible. So it doesn't initially behave this tactically, it has to be researched.
Target Sorts. There's a (currently unused) preset called Behavior Count, which you must align to a specific Behavior, or you can activate the application of Id Markers and use the existing TSMarker.
I'm not sure whether these are reevaluated on every shot, so you might need a Search->Issue Order effect in your weapon. If you are using Issue Order effects include a way for players to deactivate them so they can still manually focus down a single target.
For the upgrade copy the weapon and swap them through the upgrade. I don't think you can do this directly, in the worst case make a Requirement to count the upgrade, a Player Requirement type validator to check this Requirement, and finally a Buff Behavior you give your unit, which bestows one weapon and removes the other one, with the validator set in the Validators (Disable) + field of the buff.
That's great, thank you so much.
I've got it working, buuut it seems to bypass the cooldown of the weapon. So it works fine but just attacks super fast. Any ideas on how to fix this?
Edit: never mind, I managed to do it by making a persistent effect that just waits the same time as the weapon cooldown
Okay, so I have a unit that is essentially a ghost that sets enemies on fire (gives them a behaviour) for a few seconds when it attacks them. To increase the effectiveness of this unit, I'd like it so it selects enemies that aren't already on fire over ones that are, in order to have the maximum number of enemies burning at any one time, as opposed to it just attacking the same burning unit over and over. I could just add a validator that checks if they have the behaviour, but then it wouldn't attack units that are on fire at all, and I just want it to prioritise ones that aren't. I could do this with triggers and it would probably be cleaner, but I feel like a data based approach could work better overall and probably be more efficient. I'm not great with the data editor though, so if anyone could guide me as to how to do this I'd be very grateful :)
Also, just to complicate things a little more, I'd like this to be an upgrade for the unit if possible. So it doesn't initially behave this tactically, it has to be researched.
Target Sorts. There's a (currently unused) preset called Behavior Count, which you must align to a specific Behavior, or you can activate the application of Id Markers and use the existing TSMarker.
I'm not sure whether these are reevaluated on every shot, so you might need a Search->Issue Order effect in your weapon. If you are using Issue Order effects include a way for players to deactivate them so they can still manually focus down a single target.
For the upgrade copy the weapon and swap them through the upgrade. I don't think you can do this directly, in the worst case make a Requirement to count the upgrade, a Player Requirement type validator to check this Requirement, and finally a Buff Behavior you give your unit, which bestows one weapon and removes the other one, with the validator set in the Validators (Disable) + field of the buff.
That's great, thank you so much. I've got it working, buuut it seems to bypass the cooldown of the weapon. So it works fine but just attacks super fast. Any ideas on how to fix this?
Edit: never mind, I managed to do it by making a persistent effect that just waits the same time as the weapon cooldown