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

Forcing Autocast

Status
Not open for further replies.
I have also that problem for my AI. I don't even know how the unit to activate auto-cast.. i can't find it on the GUI trigger..maybe vJASS will do..
I know for a fact that some autocasts are possible to be activated as green at the same time.
If someone can name 5 autocasts that are possible to be active on the same time, it will solve it as well. (I need a unit to have all 5 autocasts as enemy targeting and all active)
 
You can,go to Object Editor > Units then go to the Abilities(in the unit datas)
You will see Ability - Default Active Ability then select the ability you want to be force auto-casted.
The ability will be force-auto casted on the time the unit enters the map.

If you want to order the unit to activate/deactivate it, use the following order ids :
JASS:
/****************************************
*
*     Copy only the numbers
*
*     I think can only be used via :
*    */IssueImmediateOrderById/*
*
*****************************************/

    constant integer ORDER_autodispeloff=852134
    constant integer ORDER_autodispelon=852133
    constant integer ORDER_barkskinoff=852137
    constant integer ORDER_barkskinon=852136
    constant integer ORDER_blackarrowoff=852579
    constant integer ORDER_blackarrowon=852578
    constant integer ORDER_bloodlustoff=852103
    constant integer ORDER_bloodluston=852102
    constant integer ORDER_breathoffire=852580
    constant integer ORDER_breathoffrost=852560
    constant integer ORDER_carrionscarabsoff=852553
    constant integer ORDER_carrionscarabson=852552
    constant integer ORDER_creephealoff=852250
    constant integer ORDER_creephealon=852249
    constant integer ORDER_curseoff=852192
    constant integer ORDER_curseon=852191
    constant integer ORDER_ensnareoff=852108
    constant integer ORDER_ensnareon=852107
    constant integer ORDER_faeriefireoff=852151
    constant integer ORDER_faeriefireon=852150
    constant integer ORDER_frenzyoff=852563
    constant integer ORDER_frenzyon=852562
    constant integer ORDER_frostarmoroff=852459
    constant integer ORDER_frostarmoron=852458
    constant integer ORDER_healoff=852065
    constant integer ORDER_healon=852064
    constant integer ORDER_incineratearrowoff=852672
    constant integer ORDER_incineratearrowon=852671
    constant integer ORDER_innerfireoff=852068
    constant integer ORDER_innerfireon=852067
    constant integer ORDER_manaflareoff=852513
    constant integer ORDER_manaflareon=852512
    constant integer ORDER_manashieldoff=852590
    constant integer ORDER_manashieldon=852589
    constant integer ORDER_parasiteoff=852603
    constant integer ORDER_parasiteon=852602
    constant integer ORDER_phaseshiftoff=852516
    constant integer ORDER_phaseshifton=852515
    constant integer ORDER_raisedeadoff=852199
    constant integer ORDER_raisedeadon=852198
    constant integer ORDER_rechargeoff=852159
    constant integer ORDER_rechargeon=852158
    constant integer ORDER_renewoff=852163
    constant integer ORDER_renewon=852162
    constant integer ORDER_repairoff=852026
    constant integer ORDER_repairon=852025
    constant integer ORDER_replenishlifeoff=852547
    constant integer ORDER_replenishlifeon=852546
    constant integer ORDER_replenishmanaoff=852550
    constant integer ORDER_replenishmanaon=852549
    constant integer ORDER_replenishoff=852544
    constant integer ORDER_replenishon=852543
    constant integer ORDER_restorationoff=852204
    constant integer ORDER_restorationon=852203
    constant integer ORDER_selfdestructoff=852042
    constant integer ORDER_selfdestructon=852041
    constant integer ORDER_slowoff=852077
    constant integer ORDER_slowon=852076
    constant integer ORDER_spellstealoff=852485
    constant integer ORDER_spellstealon=852484
    constant integer ORDER_townbelloff=852083
    constant integer ORDER_townbellon=852082
    constant integer ORDER_vengeanceoff=852523
    constant integer ORDER_vengeanceon=852522
    constant integer ORDER_weboff=852213
    constant integer ORDER_webon=852212
Hope i helped :D
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
nice numbers you have here, would you mind posting it in Jass section? Nes has something similar with normal orders, but Im not sure if he has autocasts too, in case he doesnt, this would be really helpful

if you have AI made with AI editor, there is not much you can do, maybe force the unit to stop casting the ability and cast it with triggers, because this AI will try to cast the spell regardless of if it is on autocast or not

If you made a click to use ability with no autocast, lets say blizzard 1 sec duration and 1 sec cooldown, he will spam it all the time until there is less then 2 or 3 enemies bunched up
 
You can,go to Object Editor > Units then go to the Abilities(in the unit datas)
You will see Ability - Default Active Ability then select the ability you want to be force auto-casted.
The ability will be force-auto casted on the time the unit enters the map.

If you want to order the unit to activate/deactivate it, use the following order ids :
JASS:
/****************************************
*
*     Copy only the numbers
*
*     I think can only be used via :
*    */IssueImmediateOrderById/*
*
*****************************************/

    constant integer ORDER_autodispeloff=852134
    constant integer ORDER_autodispelon=852133
    constant integer ORDER_barkskinoff=852137
    constant integer ORDER_barkskinon=852136
    constant integer ORDER_blackarrowoff=852579
    constant integer ORDER_blackarrowon=852578
    constant integer ORDER_bloodlustoff=852103
    constant integer ORDER_bloodluston=852102
    constant integer ORDER_breathoffire=852580
    constant integer ORDER_breathoffrost=852560
    constant integer ORDER_carrionscarabsoff=852553
    constant integer ORDER_carrionscarabson=852552
    constant integer ORDER_creephealoff=852250
    constant integer ORDER_creephealon=852249
    constant integer ORDER_curseoff=852192
    constant integer ORDER_curseon=852191
    constant integer ORDER_ensnareoff=852108
    constant integer ORDER_ensnareon=852107
    constant integer ORDER_faeriefireoff=852151
    constant integer ORDER_faeriefireon=852150
    constant integer ORDER_frenzyoff=852563
    constant integer ORDER_frenzyon=852562
    constant integer ORDER_frostarmoroff=852459
    constant integer ORDER_frostarmoron=852458
    constant integer ORDER_healoff=852065
    constant integer ORDER_healon=852064
    constant integer ORDER_incineratearrowoff=852672
    constant integer ORDER_incineratearrowon=852671
    constant integer ORDER_innerfireoff=852068
    constant integer ORDER_innerfireon=852067
    constant integer ORDER_manaflareoff=852513
    constant integer ORDER_manaflareon=852512
    constant integer ORDER_manashieldoff=852590
    constant integer ORDER_manashieldon=852589
    constant integer ORDER_parasiteoff=852603
    constant integer ORDER_parasiteon=852602
    constant integer ORDER_phaseshiftoff=852516
    constant integer ORDER_phaseshifton=852515
    constant integer ORDER_raisedeadoff=852199
    constant integer ORDER_raisedeadon=852198
    constant integer ORDER_rechargeoff=852159
    constant integer ORDER_rechargeon=852158
    constant integer ORDER_renewoff=852163
    constant integer ORDER_renewon=852162
    constant integer ORDER_repairoff=852026
    constant integer ORDER_repairon=852025
    constant integer ORDER_replenishlifeoff=852547
    constant integer ORDER_replenishlifeon=852546
    constant integer ORDER_replenishmanaoff=852550
    constant integer ORDER_replenishmanaon=852549
    constant integer ORDER_replenishoff=852544
    constant integer ORDER_replenishon=852543
    constant integer ORDER_restorationoff=852204
    constant integer ORDER_restorationon=852203
    constant integer ORDER_selfdestructoff=852042
    constant integer ORDER_selfdestructon=852041
    constant integer ORDER_slowoff=852077
    constant integer ORDER_slowon=852076
    constant integer ORDER_spellstealoff=852485
    constant integer ORDER_spellstealon=852484
    constant integer ORDER_townbelloff=852083
    constant integer ORDER_townbellon=852082
    constant integer ORDER_vengeanceoff=852523
    constant integer ORDER_vengeanceon=852522
    constant integer ORDER_weboff=852213
    constant integer ORDER_webon=852212
Hope i helped :D

You mean if I shift-enter the autocast stats, I could autocast more than one ability and all of those abilities will all be autocasts in the game?
And I didnt understood anything about the jass. What I should do with all those numbers?
Just to make it absoulty clear: My aim is to create units that spam their spells, so I give them fairy fire with 0.01 duration and trigger the abilities with a trigger and a dummy. I want each unit to have 5 spells and I want them all to be cast very hard. The idea was to let each unit 5 autocast as default but I think that even if I picked that inside the editor, on built in unit, only one autocast will apply. What is this jass? I don't know Jass. +rep for helping so far.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
If my memory is correct, you can only have 1 autocast ability turned to autocast at a time, so you cant have 2 different abilities put to autocast at the same time

the numbers are the IDs of the orders, this order will force the unit to turn on or off the autocast
 
If my memory is correct, you can only have 1 autocast ability turned to autocast at a time, so you cant have 2 different abilities put to autocast at the same time

the numbers are the IDs of the orders, this order will force the unit to turn on or off the autocast

So, once a spell was cast i will autocast the other :D
but how this works? custom script: call 123456
?
 
call IssueImmediateOrderById(myUnit, 12312424)

That's how you do it :D
You must learn JASS bro :D

Im sure it could be used inside custom script as well. Thanks, this have solved my question.
// Off Topic
To whoever wanna know, making Fairy Fire with 100 versions, will make autocast of a single ability from the entire set to toggle on or off to each and any of the choosen units autocasts, even if the unit is not of the same type, this means that in order to do it, one must either use healing that target an enemy unit - and use 5 different autocast abilities OR use some trigger that autocast (sub ability?) as Almia just shown.
// Off Topic
 
Only one autocast ability is allowed per unit.The list i show you is the integer form of orders.

Event: unit start the effect of an ability
condition: ability being cast equalls to autocast1asdefault
action: //comment: 1234 means ability autocast#2
call IssueImmediateOrderById(myUnit, 12312424) <- stop autocast #1
call IssueImmediateOrderById(myUnit, 1234) <- start autocast #2

// the abilities will have different id.

This is my plan
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
Arhowk had very similar request and I found out that you must delay it to next running thread(start timer with 0 duration), otherwise the unit wont switch autocasts

Also you dont need to turn off one autocast to start other, you can just turn on another ability with autocast to on, because you can never have 2 abilities set to autocast
 
Arhowk had very similar request and I found out that you must delay it to next running thread(start timer with 0 duration), otherwise the unit wont switch autocasts

Also you dont need to turn off one autocast to start other, you can just turn on another ability with autocast to on, because you can never have 2 abilities set to autocast

Approved, but this gonna take too much work. Sounds amazingly difficult. Do you know if a system like this was posted?
 
Status
Not open for further replies.
Top