• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

non-battle autocast

Status
Not open for further replies.
Level 5
Joined
Apr 22, 2008
Messages
139
im looking for an autocast that will activate as soon as the unit is at the required mana, and isnt dependant on battle (ie frost armor) or unit health (ie healing). is there an autocast like this, and if not, how would i go about making one?
secondly, how do i make a unit have negative mana regen (like the destroyer)
 
Level 9
Joined
Oct 7, 2007
Messages
599
Just use shift-enter on the mana regeneration field to input a negative value. Make sure you have negative values enabled in your preferences. This should be the solution to your second question.

You can trigger the first ability to "autocast." Although, if you're using this ability on the unit described on part two (with negative regeneration), you can consider the Essence of Mana (or whatever spell the Obsidian Statue has; I forget its name) and just make it affect itself, granting 0 mana and changing the other fields as needed. Then you would trigger its effect whenever this spell is cast.
 
Level 5
Joined
Apr 22, 2008
Messages
139
hmm ok, but the ability requires the unit's full mana to cast (its purpose is to split the unit into two when the unit gets full mana) so will the obsidian statues autocast still activate?
wait, idea: what if i put a dummy unit with like 0/10 mana and no mana regen to follow the unit with the autocast, to get the unit to trigger the autocast to restore its mana. would that work?
 
Level 9
Joined
Oct 7, 2007
Messages
599
I suppose. It's also pretty easy if you trigger it, just add units of this type to a unit group variable (name it whatever). Every X seconds (frequency up to you), you pick every unit in the unit group, and if it has full mana it'll split the unit (set its mana to 0 and create a new one). If you prefer having the ability regardless, once it hits full mana you just order it to cast the ability. Then, when it casts the ability (using another trigger), you split it.
 
Level 5
Joined
Apr 22, 2008
Messages
139
order it to use the ability... that sounds ok but as far as ive found, the Unit Issue Order actions only allows the casting of ladder abilities so how could i make my unit cast an ability with a trigger?
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
order it to use the ability... that sounds ok but as far as ive found, the Unit Issue Order actions only allows the casting of ladder abilities so how could i make my unit cast an ability with a trigger?

''Issue Order Targeting A Unit/Point/No Target'' can cast custom abilities.

For example:
  • Unit - Order (Last created unit) to Orc Raider - Ensnare (Attacked unit)
This function will order <Last Created Unit> to cast any ability based on ''Ensnare'' (or channel with ''ensnare'' Base Order ID) on <Attacked Unit>

If you convert this in JASS, you will get this:
JASS:
call IssueTargetOrderBJ( GetLastCreatedUnit(), "ensnare", GetAttackedUnitBJ() )

Each ability has ''Text - Order String Use/Turn On'', so that function orders unit to cast ability with ''ensnare Order''
60089d1247135170-non-battle-autocast-ensanre.jpg


Note that this cannot be changed.

Only channel can change it (with Base Order ID).
 

Attachments

  • Ensanre.JPG
    Ensanre.JPG
    16.6 KB · Views: 149
Status
Not open for further replies.
Top