I have encounterd an odd problem. I am playing around with Zealot - Charge. I remove auto-cast, which means that players need to target a specific unit to charge towards.
Imagine that the player uses Charge on a Zealot and clicks to target an enemy Speedling. The Zealot charges towards it, but does not catch it. Instead it will just follow it and try to attack it. And this is perfectly fine.
The problem is that as soon as the Charge cooldown is gone, the ability will auto-cast itself... again... and again... So if the Zealot chases the Speedling across the map, it will every 10 sec auto-cast Charge towards that specific unit. (Not against any other units at all.) And yes, auto-cast is removed.
Any idea how to prevent Charge from behaving like this?
Preferably, Charge should only happen once, then the player needs to manually use it again.
Kabel, we seem to be fooling around with the same thing. From what I've been playing around, it might be related with autocast validators, or maybe some smartcast flag. It could also be related with the attack order being given with some autocast being on before issuing the order attack (as the Charge ability seems to be linked to the attack command) or the flag Autocast Initially On. Just look at this closely.
Charge ability is somewhat messy. I've been trying to rework it having "two modes"- A manual mode that allows to use it as an speed buff and the actual Autocast mode. However, when touching validators to allow free movement when in charge mode, autocast doesn't work, and you cannot flee because as it is an attack command, you cannot use it manually unless you get out of the weapon scan range. So validators seem to be meh.
IIRC this is because the zealot charge is an Augment ability. Instead, create a new ability (Targeted Charge) and with the a Set effect that applies a Charge behavior (speed buff) and an Issue Order (attack target).
Kabel, I'll have a look at this in the mod I was doing as soon as I return home in few days. I did some testing while achieving the basic manual charge (I removed and changed validators from the ability, the effect and the behaviour) and I didn't remember something like that happening, because in my case I removed too many validators and charge didn't autotrigger. It seemed to work fine after readding one or two. But maybe when I get back at home I'll find a surprise I could have ignored (hope not).
It seems to be related with the "auto" value, so why not, have a look again, it's 2min only. Try to start again, remove anything related with autocast/smartcast in stats/flags, set target to unit/point (for testing porposes), remove validators for the ability and probably effect (just set charge max distance in autocast validators and leave Not Holding position as it is if you want to preserve autocast mode as it is by default). And if I'm not wrong, remove the two validators in the apply behaviour effect. I don't remember if I removed both or only one.
I'm a bit noob with the editor, but from what I've tested, I would look at "Charge Max/Min distance" and "Charge Trigger distance". Probably something from there is messing with the autocast values. Check also any modification you could have done to the behaviour and its interactions.
With that, it should work without problems. At least in my case is like that if I haven't forgotten something.
I also removed "channeling" flag in the behaviour to allow free movement, but it shouldn't be related with your issue.
BTW if you manage to create a workaround to override attack order or similar, please tell me something.
If nothing works, go the "lazy" way and rework it as an Effect-targe/effect-instant.
I tried your suggestion, Doctor, and it works fine! The Zealot no longer auto-casts Charge at the same target..
There is however one last dilemma that I am unable to find a solution to:
I have made so Charge can be used at BOTH target point or target unit. This means that the player can use it to run faster towards a targeted enemy unit, or to run faster towards a targeted location. This works perfect as long as there is no enemy units near the Zealot when Charge is used.
The problem is that IF the Zealot is closer than range 5 to an enemy unit, Charge ONLY works when it targets an enemy unit. So you can not use it to flee from a combat by targeting a location. If you do, Charge just refuses to cast itself.
I think this is because Zealots have scan range 5 on their weapon. When I put that to 0, Zealots are now able to run away from enemies, even if they are close to them. Charge works in all situations - attack target unit, run towards target location, in and out of combat. But the consequence is that scan range has to be at 0...
Anyone has any idea for a potential solution?
(I have tested tons of things, including that Charge applies a Move-command instead of an Attack-command. In that case, the opposite problem occurs - Zealots can NOT use Charge at an enemy unit if closer than range 5, only run towards a location... Again, the scan range seems to be the problem...)
Kabel, we are exactly at the same point. I posted this issue you are having now in the Data forum section and the Trigger section few days ago (you can check it) but has remained without answer. I also posted it in US fórums waiting for some luck. I suggest you to post it again since your name has some presence here. I've been away from home for a few days and I'm unable to mess around with the editor to test some possible solutions. But I think that it could be problematic for the autocast aspect to apply a buff/ effect over the weapon scan range to make it 0.
One solution I thought is about making it use Smart key functionality (makes to move on terrain, to attack onto unit). This one could be done possibly by triggers and reworking the type of ability.
Another one, based on editor theory, would be to try to add the Modification State flag "Passive" in behaviours which supposedly prevents automatic weapon aquisition. (http://www.sc2mapster.com/wiki/galaxy/data/behaviors/buff/). This could work if you have reworked the ability into an Effect-target
So you can apply it over the behaviour. I don't think that it would work with the default Charge ability, which is "Augment" type, without reworking the attack command it uses to apply the Passive stat flag in another behaviour.
Finnally , 3rd option: I think you could apply a buff/effect/behaviour which modifies weapon acquisition range to 0 and lasts 0.5s (a short time) which applies just before the Charge ability/Issue attack order, depending on how you've rebuilt the charge ability. But that is a bad workaround.
Things should go by that way, but possibly there is somewhere in the editor something to deal specifically with this cases, ignoring acquisition. There must be a way. We need an "SmartOrder Command" ability for this XD.
If everything fails, time to rebuild it as an Effect-instant ability and maybe think some things to limitate it. That Passive flag could be of help. Things should go by that way, but possibly there is somewhere in the editor something to deal specifically with this cases.
However, being an instant ability has the downside of losing that particular "charge to that point" and charge then should be ininterrupible to avoid the issue. It would be transformed into a semipassive buff instead, which has the advantage of being full micro, as nothing is automated. But you would lose that aspect of linear-only/interruptible charge by move command. Well, manual charge, even if interruptible, allows you to avoid interruption when attack command is issued.
Please tell me something if you manage to get it. If not, maybe we could try to contact some developer in the US forums. They post sometimes when people ask things, so this could be an option.
I have encounterd an odd problem. I am playing around with Zealot - Charge. I remove auto-cast, which means that players need to target a specific unit to charge towards.
Imagine that the player uses Charge on a Zealot and clicks to target an enemy Speedling. The Zealot charges towards it, but does not catch it. Instead it will just follow it and try to attack it. And this is perfectly fine.
The problem is that as soon as the Charge cooldown is gone, the ability will auto-cast itself... again... and again... So if the Zealot chases the Speedling across the map, it will every 10 sec auto-cast Charge towards that specific unit. (Not against any other units at all.) And yes, auto-cast is removed.
Any idea how to prevent Charge from behaving like this?
Preferably, Charge should only happen once, then the player needs to manually use it again.
@Kabelkorven: Go
Kabel, we seem to be fooling around with the same thing. From what I've been playing around, it might be related with autocast validators, or maybe some smartcast flag. It could also be related with the attack order being given with some autocast being on before issuing the order attack (as the Charge ability seems to be linked to the attack command) or the flag Autocast Initially On. Just look at this closely.
Charge ability is somewhat messy. I've been trying to rework it having "two modes"- A manual mode that allows to use it as an speed buff and the actual Autocast mode. However, when touching validators to allow free movement when in charge mode, autocast doesn't work, and you cannot flee because as it is an attack command, you cannot use it manually unless you get out of the weapon scan range. So validators seem to be meh.
@Kabelkorven: Go
IIRC this is because the zealot charge is an Augment ability. Instead, create a new ability (Targeted Charge) and with the a Set effect that applies a Charge behavior (speed buff) and an Issue Order (attack target).
@PirateArcade | I make games | Ask me things on Discord
More like he needs an issue order to stop if the attack is queued and not being currently used.
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
Yeah I have tried using an issue order effect when Charge expires.
If the unit stops after Charge expires, it is kinda annoying for the player.
If the unit it ordered to just attack-move after the target, after the buff expires, Charge is still reapplied all the time
@Kabelkorven: Go
Kabel, I'll have a look at this in the mod I was doing as soon as I return home in few days. I did some testing while achieving the basic manual charge (I removed and changed validators from the ability, the effect and the behaviour) and I didn't remember something like that happening, because in my case I removed too many validators and charge didn't autotrigger. It seemed to work fine after readding one or two. But maybe when I get back at home I'll find a surprise I could have ignored (hope not).
It seems to be related with the "auto" value, so why not, have a look again, it's 2min only. Try to start again, remove anything related with autocast/smartcast in stats/flags, set target to unit/point (for testing porposes), remove validators for the ability and probably effect (just set charge max distance in autocast validators and leave Not Holding position as it is if you want to preserve autocast mode as it is by default). And if I'm not wrong, remove the two validators in the apply behaviour effect. I don't remember if I removed both or only one. I'm a bit noob with the editor, but from what I've tested, I would look at "Charge Max/Min distance" and "Charge Trigger distance". Probably something from there is messing with the autocast values. Check also any modification you could have done to the behaviour and its interactions.
With that, it should work without problems. At least in my case is like that if I haven't forgotten something. I also removed "channeling" flag in the behaviour to allow free movement, but it shouldn't be related with your issue. BTW if you manage to create a workaround to override attack order or similar, please tell me something.
If nothing works, go the "lazy" way and rework it as an Effect-targe/effect-instant.
Get the charge buff to apply a second buff when it expires disabling the charge ability for a bit?
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
I tried your suggestion, Doctor, and it works fine! The Zealot no longer auto-casts Charge at the same target..
There is however one last dilemma that I am unable to find a solution to:
I have made so Charge can be used at BOTH target point or target unit. This means that the player can use it to run faster towards a targeted enemy unit, or to run faster towards a targeted location. This works perfect as long as there is no enemy units near the Zealot when Charge is used.
The problem is that IF the Zealot is closer than range 5 to an enemy unit, Charge ONLY works when it targets an enemy unit. So you can not use it to flee from a combat by targeting a location. If you do, Charge just refuses to cast itself.
I think this is because Zealots have scan range 5 on their weapon. When I put that to 0, Zealots are now able to run away from enemies, even if they are close to them. Charge works in all situations - attack target unit, run towards target location, in and out of combat. But the consequence is that scan range has to be at 0...
Anyone has any idea for a potential solution?
(I have tested tons of things, including that Charge applies a Move-command instead of an Attack-command. In that case, the opposite problem occurs - Zealots can NOT use Charge at an enemy unit if closer than range 5, only run towards a location... Again, the scan range seems to be the problem...)
@Kabelkorven: Go
Kabel, we are exactly at the same point. I posted this issue you are having now in the Data forum section and the Trigger section few days ago (you can check it) but has remained without answer. I also posted it in US fórums waiting for some luck. I suggest you to post it again since your name has some presence here. I've been away from home for a few days and I'm unable to mess around with the editor to test some possible solutions. But I think that it could be problematic for the autocast aspect to apply a buff/ effect over the weapon scan range to make it 0.
One solution I thought is about making it use Smart key functionality (makes to move on terrain, to attack onto unit). This one could be done possibly by triggers and reworking the type of ability.
Another one, based on editor theory, would be to try to add the Modification State flag "Passive" in behaviours which supposedly prevents automatic weapon aquisition. (http://www.sc2mapster.com/wiki/galaxy/data/behaviors/buff/). This could work if you have reworked the ability into an Effect-target So you can apply it over the behaviour. I don't think that it would work with the default Charge ability, which is "Augment" type, without reworking the attack command it uses to apply the Passive stat flag in another behaviour.
Finnally , 3rd option: I think you could apply a buff/effect/behaviour which modifies weapon acquisition range to 0 and lasts 0.5s (a short time) which applies just before the Charge ability/Issue attack order, depending on how you've rebuilt the charge ability. But that is a bad workaround.
Things should go by that way, but possibly there is somewhere in the editor something to deal specifically with this cases, ignoring acquisition. There must be a way. We need an "SmartOrder Command" ability for this XD.
If everything fails, time to rebuild it as an Effect-instant ability and maybe think some things to limitate it. That Passive flag could be of help. Things should go by that way, but possibly there is somewhere in the editor something to deal specifically with this cases.
However, being an instant ability has the downside of losing that particular "charge to that point" and charge then should be ininterrupible to avoid the issue. It would be transformed into a semipassive buff instead, which has the advantage of being full micro, as nothing is automated. But you would lose that aspect of linear-only/interruptible charge by move command. Well, manual charge, even if interruptible, allows you to avoid interruption when attack command is issued.
Please tell me something if you manage to get it. If not, maybe we could try to contact some developer in the US forums. They post sometimes when people ask things, so this could be an option.
You using an enumerate area 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
@DrSuperEvil: Go Using it to issue order to move instead of attack you say?