I have changed the Zealot's Charge ability so that the Charging behaviour will continue even when the player moves the Zealot.
I.e. my squad of Zealots may charge at an enemy unit, but then I move them to behind the enemy, and despite me having not given them an enemy target, they continue to have the speed boost and thus they easily move behind the enemy and surround it.
It's an idea of mine to nerf the Zealot's speed boost while charging but also allow players to control them while they are charging and thus allow them to surround more easily. Hence, there could be more control involved with Zealots when it comes to kiting and chasing.
However, I don't want players to be able to use the charge ability on their own units, in which the behaviour would be applied as it does in vanilla game-play, and then immediately order the Zealots to do something else. Otherwise, players would be able to abuse the Charge ability and use it in ways it wasn't intended e.g. for much quicker scouting or much easier escaping. I want the ability to still be purely offensive.
So, I thought I'd create a new validator and include it in the Behaviour: Validators (Disable) field of the Charging behaviour. My goal is for the Zealot to have its charging behaviour disabled if no enemy units are within its sight range, and therefore the Zealot won't get a speed boost by using Charge on the player's own units or allied units; it will only get the speed boost when enemies are nearby (so, the ability can technically still be used on non-enemy units, but will only work in that way if enemy units are within the Zealot's sight range).
My problem is that I don't know how to create such a validator. I want it to check if there is at least 1 enemy unit in the caster's sight range. For the Charging behaviour, if that validator returns false, then the behaviour is disabled (I'm assuming that if the behaviour is disabled, as opposed to removed, then it can be re-enabled if the validator then returns true during the behaviour's duration).
Line of sight is very specific and hard to determine on a per unit basis. Rather go with some flat out range, eg 15 (distance used in melee for persistent missile launcher cutoff) and disable charging if no enemies are in such a range.
Another approach would be to out right disable charge working on friendly units. This is probably the easiest/most efficient way to prevent it being exploited for faster movement.
Another approach would be to out right disable charge working on friendly units. This is probably the easiest/most efficient way to prevent it being exploited for faster movement.
Yeah, that would be better. I suppose I didn't consider that because I wanted players to still be able to use the ability on their own units...I don't know why...but in the end, it shouldn't matter much whether it can be used on friendly units. If players want their zealots to attack a friendly unit, they could just use attack-move.
I think I'll stick with validating whether an enemy unit is nearby, because players could still use the Charge on an enemy unit that is chasing them, and then immediately move the zealots in the opposite direction to give them a large speed boost for escaping. With the validator, they can still do that, but the charge should theoretically stop prematurely once the enemy units get out of range, therefore minimizing the speed bonus and capability of using it to escape rather than engage.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have changed the Zealot's Charge ability so that the Charging behaviour will continue even when the player moves the Zealot.
I.e. my squad of Zealots may charge at an enemy unit, but then I move them to behind the enemy, and despite me having not given them an enemy target, they continue to have the speed boost and thus they easily move behind the enemy and surround it.
It's an idea of mine to nerf the Zealot's speed boost while charging but also allow players to control them while they are charging and thus allow them to surround more easily. Hence, there could be more control involved with Zealots when it comes to kiting and chasing.
However, I don't want players to be able to use the charge ability on their own units, in which the behaviour would be applied as it does in vanilla game-play, and then immediately order the Zealots to do something else. Otherwise, players would be able to abuse the Charge ability and use it in ways it wasn't intended e.g. for much quicker scouting or much easier escaping. I want the ability to still be purely offensive.
So, I thought I'd create a new validator and include it in the Behaviour: Validators (Disable) field of the Charging behaviour. My goal is for the Zealot to have its charging behaviour disabled if no enemy units are within its sight range, and therefore the Zealot won't get a speed boost by using Charge on the player's own units or allied units; it will only get the speed boost when enemies are nearby (so, the ability can technically still be used on non-enemy units, but will only work in that way if enemy units are within the Zealot's sight range).
My problem is that I don't know how to create such a validator. I want it to check if there is at least 1 enemy unit in the caster's sight range. For the Charging behaviour, if that validator returns false, then the behaviour is disabled (I'm assuming that if the behaviour is disabled, as opposed to removed, then it can be re-enabled if the validator then returns true during the behaviour's duration).
Does anyone know to create such a validator?
I would combine a Unit Filter and Location Range validator.
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
Line of sight is very specific and hard to determine on a per unit basis. Rather go with some flat out range, eg 15 (distance used in melee for persistent missile launcher cutoff) and disable charging if no enemies are in such a range.
Another approach would be to out right disable charge working on friendly units. This is probably the easiest/most efficient way to prevent it being exploited for faster movement.