• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Command to use Ability automatically

Level 5
Joined
Mar 7, 2024
Messages
79
This may sound difficult but can you help me? When using the chat command: +auto will make the hero automatically use one of the Abilities. When the Ability ends it will activate another Ability repeating like Ability A to B to C, and can use the -auto command to stop using the Ability. Just like the auto of online RPG games.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
The complexity of a proper solution increases as more of these things are true:
  • The abilities for a given unit do not all have the same duration.
  • The abilities for a given unit do not all have the same cooldown.
  • The cooldown of abilities is longer than their duration or the time between ability castings.
  • The set of base abilities for each unit is different (not what they actually do but what they are based on), which determines the order they must be issued to cast them and their targeting paradigms.
  • Any abilities have conditional activation requirements (“only use this when at least 2 enemies are nearby”).
  • You wish either not to interrupt the unit’s current order or to return to the previously active order after casting each ability.
  • You are using exclusively GUI (no easy access to timers) and there is more than one unit per player that you wish for this autocast behavior to work.
There are probably more. Where does your map stand on such things?
 
Level 5
Joined
Mar 7, 2024
Messages
79
The complexity of a proper solution increases as more of these things are true:
  • The abilities for a given unit do not all have the same duration.
  • The abilities for a given unit do not all have the same cooldown.
  • The cooldown of abilities is longer than their duration or the time between ability castings.
  • The set of base abilities for each unit is different (not what they actually do but what they are based on), which determines the order they must be issued to cast them and their targeting paradigms.
  • Any abilities have conditional activation requirements (“only use this when at least 2 enemies are nearby”).
  • You wish either not to interrupt the unit’s current order or to return to the previously active order after casting each ability.
  • You are using exclusively GUI (no easy access to timers) and there is more than one unit per player that you wish for this autocast behavior to work.
There are probably more. Where does your map stand on such things?

Thank you for your interest, I have done that, can you tell me where this is in the Set Variable folder? I can't find it.
edit : My version is 1.31
HOII.PNG
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
I don’t understand what you mean by “I have done that”, because I didn’t tell you anything to do. I listed a bunch of things that might or might not be true in your map and suggested that the number of those things (and others I didn’t list) that are true will make autocast loops more complicated to design and implement.

The function you have shown is for modifying parts of an ability after game start (instead of in the Object Editor when making your map). It changes fields that use real values that can scale with ability level (like cooldown or damage dealt, but not something like cast time which isn’t level-dependent).

What are you trying to do with that function? It also doesn’t exist on older versions of wc3 or may simply be nonfunctional on old versions that do have it.
 
Level 5
Joined
Mar 7, 2024
Messages
79
I don’t understand what you mean by “I have done that”, because I didn’t tell you anything to do. I listed a bunch of things that might or might not be true in your map and suggested that the number of those things (and others I didn’t list) that are true will make autocast loops more complicated to design and implement.

The function you have shown is for modifying parts of an ability after game start (instead of in the Object Editor when making your map). It changes fields that use real values that can scale with ability level (like cooldown or damage dealt, but not something like cast time which isn’t level-dependent).

What are you trying to do with that function? It also doesn’t exist on older versions of wc3 or may simply be nonfunctional on old versions that do have it.
I'm sorry my English is not good, I'm praising you because you helped me. Sorry for making you misunderstand. 🥰
 
Top