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

Autocast + Trigger = help?

Status
Not open for further replies.
Level 13
Joined
Oct 10, 2009
Messages
439
Okay, i have a trigger that uses a basic
  • Unit - A unit begins casting an ability
However, the abillity that i have working with this is an autocast, and it seems to work only when you Manually cast it. Is there anyway to make it work via the autocast?
 
Level 14
Joined
Jul 26, 2008
Messages
1,009
This isn't a safe method. "Starts the effect of an ability" performs it's actions before the ability even goes off. It can be great for checking pre-requistes before a spell fires and issue a stop, but not for doing the effects of a spell.

I'll see what I can' dig up on a more reliable means, but like what I find will be in JASS.
 
Level 9
Joined
Nov 4, 2007
Messages
933
This isn't a safe method. "Starts the effect of an ability" performs it's actions before the ability even goes off. It can be great for checking pre-requistes before a spell fires and issue a stop, but not for doing the effects of a spell.

I'll see what I can' dig up on a more reliable means, but like what I find will be in JASS.

Uhhh no, you're thinking of is Begins casting an ability, effect and casting =/=, starts the effect of an ability will activate when the cooldown activates and the mana is drained.
 
Level 13
Joined
Oct 10, 2009
Messages
439
Okay ive given it a try, but thats not working either... Since its a dummy spell.

  • Unit - begins casting an ability
And then creates a dummy and so on, the abillity works when i manually cast it but not other wise,

  • Unit - starts the effect of an ability
By using what you gave me the trigger doesnt seem to work at all. should i change the variables of "Casting Unit" "Ability being cast" To somthing else in order it to work?

EDIT:
  • Unit - starts the effect of an ability
Does the exact same thing as the old one, i still need to manualy cast it.
 
Level 14
Joined
Jul 26, 2008
Messages
1,009
One work around is that most autocasts have a buff. The trick is that you check for the buff, and if the unit has the buff you do the effects and remove the buff (Or keep it on if it's periodic)

Simply run some Does Unit Have Buff under Booleans for conditions. Probably would benefit from turning on a trigger which runs the timer as well will a rather low periodic of 0.1 or 0.03 depending.

Now if it's an attack enhancing ability, you can turn on a check for orderstring. Turn on, then create an integer that increases to 1. If the Unit attacks another unit and that variable is 1, do effects. If it isn't 1, don't do effects. Make sure you also turn it off if the unit dies.

Hope this helps. Good luck!
 
Status
Not open for further replies.
Top