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

All About Auto-Castable abilities that use Triggers

Status
Not open for further replies.
Level 6
Joined
Apr 27, 2006
Messages
186
I would like to make some auto-castable abilities for the heros in my map, but I do not completely understand how they work. For example, If I had an autocastable... searing arrows, but I wanted to make it GUI triggered instead, what would the EVENT for the trigger be(Unit Starts Casting an ability, begins casting, etc.)? As when I was experimenting I found that the event "A unit Starts the Effects of an Ability", which I usually use for my triggered abilities, only worked for the first time a unit is healed with the priest's "Heal" ability. So I would like to know how to have it detect when the heal ability is eing used.
Would it be like this?

Trigger1
Event - Unit Stats the effects of an ability
Conditions - Ability being cast = Heal
Actions - Set healBeingCast(Boolean) to True

Trigger2
Event - Unit Stops Casting an ability
Conditions - Ability being cast = Heal
Actions - Set healBeingCast(Boolean) to False

I would appreciate any help, thank you in advance.
 
Level 6
Joined
Apr 27, 2006
Messages
186
http://www.forums.hiveworkshop.com/showthread.php?t=27899
Check this out! Everything is written, all advantages and disadvantages of the triggers, and the whole thing. Be prepared for JASS... (Just because this cannot be done properly in GUI)

Wow, that looks confusing, Could you just give me the script for detecting when the autocast is turned on, and when it is detected setting a Boolean value that can be used in GUI to true and vice versa for turning off the autocast?
If not I got an idea for an autocast. Basically it’s a unit ability, when you click on it, it removes the ability and adds any kind of passive ability that accomplishes the affect of your autocast (say +10 damage if your ability is searing arrows). Each time you attack, you lose a certain amount of mana, if you have no mana the passive ability is removed and the turn on autocast is once again added. I do not want to use this method however because it is not a familiar auto-cast system and people that play my rpg won’t like it, so… please give me the script :p/
 
Level 11
Joined
Jul 12, 2005
Messages
764
Event - Unit is issued an order
Cond -
-Or:
--Issued order is equal to "flamingarrows"
--Issued order is equal to "unflamingarrows"
Actions -
-If Issued order is equal to "flamingarrows"
--Set Boolean to true
-Else
--Set Boolean to false

If you just want to set a boolean, that's all...
 
Level 6
Joined
Apr 27, 2006
Messages
186
Wow, thanks, I don't see what else I would need? I set the triggering unit to a variable (since I don't need it to be multi-instanceable), and whenever that unit attacks or is attacked and the boolean is on I do certain actions. Thx for the help Pascovich!
 
Level 6
Joined
Apr 27, 2006
Messages
186
Paskovish, I just realized that ur method doesn't work effectively if you have one or more autocastable abilities made out of searing arrows :\. How do you make the trigger recognize the ability and not just the orderstring? You could use different auto-castable abilities, but eventually you would run out of them.
 
Last edited:
Level 11
Joined
Jul 12, 2005
Messages
764
Simply add the condition:
(Level of <Ability> for Triggering Unit) is greater then 0

Notice that, this will be buggy when you set a cooldown for the ability. Also when the unit runs out of mana, so add the condition to the 'Unit is attacked' trigger:
(Current mana of Attacking Unit) is greater than or equal to <manacost>

That's why arrow spells perfectly can ONLY be done in JASS!

PS. It's not Pascovich, not even Paskovish. It's paskovich... :D
 
Level 10
Joined
Apr 9, 2004
Messages
502
Well i dunno, i have a .GUI version and it seems to run fine. I dunno, it's never leaked before and i haven't noticed any weirdness thus far although i know some problems may arise, i think a .GUI system can work fine within certain parameters, those being: the attacks hit before another attack is dealt, or other damage from the same target is registered. I haven't experienced any of the mentionned problems that have been mentionned; i dunno; it seems to run pretty smoothly for me..
 
Status
Not open for further replies.
Top