HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detect Order/Spell for abilities without order..

07-19-2007, 03:01 PM#1
Bloodlust
Hello.

I made an ability based on the scroll of regeneration. Now I want a trigger to start when the unit begins to cast the ability. (begins to cast is checked after casting time; effect of ability even later)
With other abilities I did it using "unit is issued an order" order equal to stomp/thunderclap/whatever

Now that scroll of regen has no "order" (and adding an order to it doesnt work either); how do i detect if the button was clicked? Without remaking the ability, of course.

Thanks for any help.
07-19-2007, 03:07 PM#2
Naakaloh
I think what you want is "Begins the effect of an ability" event or something like that, I don't know what it is in the GUI. And the spell should have an ability ID that you can compare without having to use the order.
07-19-2007, 03:11 PM#3
Histenchist
Cant you use this;
Trigger:
Spell
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Scroll of YourSpell
Collapse Actions
Game - Run your triggers
?
07-19-2007, 05:43 PM#4
Bloodlust
Quote:
Originally Posted by Bloodlust
(begins to cast is checked after casting time; effect of ability even later)


its checked after the casting time, which is too late.
07-19-2007, 05:55 PM#5
Histenchist
Errhh maby you want to tell us what kind of spell you are trying to do.!

Edit:
Cant you find buff like this then?
Trigger:
Spell
Collapse Events
Time - Every 0.05 seconds of game time
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Acid Bomb) Equal to True
Then - Actions
Else - Actions
07-19-2007, 06:27 PM#6
Bloodlust
The buff is applied when the effect of the ability starts.
As I said, I made Scroll of Regeneration a Hero Spell. The value "order" is empty. Warstomp for example has order = stomp, Frostnova has order = frostnova.

Now, if I want to check if someone started casting a warstomp with 2 seconds casting time, I need to use the event "issued order with no target" condition "issued order equal to stomp". When I use "begins casting" its after those 2 seconds. And trust me, I tested it because I thought its the other way, too.
Scroll of Regeneration has no "order", but there must be a way (read: Jass?) to check if the ability was "clicked"/ordered. Without remaking the spell.
07-19-2007, 06:34 PM#7
Histenchist
Just recreate it, it cannot be that hard to recreate scroll of regeneration.
07-19-2007, 06:46 PM#8
Naakaloh
Well, it is possible to determine which slot the item you're using is in, and there are order IDs that correspond to an item being used in those slots. Just look at PitzerMike's Warcraft Ability Guide until you find those ID codes

http://www.wc3campaigns.net/showthread.php?t=81742
07-19-2007, 07:12 PM#9
Anitarf
He made a hero ability out of it, it's not an item.

You need to get the spell's order id. Not all spells have an orderstring, but all have an order id. Read more:

http://www.wc3campaigns.net/showpost...20&postcount=9
07-19-2007, 10:59 PM#10
Bloodlust
Quote:
Originally Posted by Anitarf
He made a hero ability out of it, it's not an item.

You need to get the spell's order id. Not all spells have an orderstring, but all have an order id. Read more:

http://www.wc3campaigns.net/showpost...20&postcount=9

Thank you! That is exactly what I was looking for. However, could you help me with the Condition? I am one of these GUI-only guys with that stunning ability not to know the most basic JASS stuff after more than 5 years of wc3 mapping.
As there is no OrderID/customscript-comparison as condition, I guess its not possible to mix a custom script line into the trigger?

(The id is 852609.)
07-20-2007, 07:57 PM#11
Histenchist
I think this should work. I have just tested it once.

Trigger:
Stuff
Collapse Events
Unit - A unit Is issued an order with no target
Conditions
Collapse Actions
Custom script: if (GetIssuedOrderId() == 852609) then
Game - Put your actions here
Custom script: endif
07-21-2007, 02:22 AM#12
Dil999
If his way doesnt work, I'll be happy to convert your trigger to JASS and put that condition in, it shouldnt be too hard.
07-21-2007, 10:32 AM#13
Bloodlust
Thank you guys, im trying right now. And fyi I need it to start a short casting bar so other player can stun and interrupt strong spells ~

Edit: Works perfect, thank you sir!