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.
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.