• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Still blur about autocast

Status
Not open for further replies.
Level 10
Joined
May 28, 2011
Messages
455
I am still blur on how to detect autocasted spell.

Let say i have frost arrow, i autocast frost arrow, the unit attack using the spell and i want to add buff to attacked unit... but how to do the add buff part!

Any tutorial?? Please teach me on this...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
There is no way to detect when a unit "casts" frost arrow.

You can detect when a unit activates/deactivates the autocast ability, add it into a uit group or save a boolean for it. Then use "unit is attacked" event to detect when the unit attacks.

Or you can try using Bloodlust as the base ability, autocast abilities like that do trigger "starts the effect of an ability" I believe.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Frost Arrow already applies a buff and that is how you usually transfer a buff over attack missiles. You alter the attack with an orb/arrow ability, check for the buff on unit takes damage event and immediately remove the buff, so no other attacks are falsely detected. Then you can add the new buff you desire.

TC does not want to detect the cast but the impact. For the cast, you could catch unit is attacked/acquires target and order the attacking unit to use Frost Arrow.

Why is this topic in Triggers&Scripts btw and why tagged as [vJASS]?
 
Level 10
Joined
May 28, 2011
Messages
455
There is no way to detect when a unit "casts" frost arrow.

You can detect when a unit activates/deactivates the autocast ability, add it into a uit group or save a boolean for it. Then use "unit is attacked" event to detect when the unit attacks.

Or you can try using Bloodlust as the base ability, autocast abilities like that do trigger "starts the effect of an ability" I believe

Damn it. Thanks for telling me anyway.

Frost Arrow already applies a buff and that is how you usually transfer a buff over attack missiles. You alter the attack with an orb/arrow ability, check for the buff on unit takes damage event and immediately remove the buff, so no other attacks are falsely detected. Then you can add the new buff you desire.

TC does not want to detect the cast but the impact. For the cast, you could catch unit is attacked/acquires target and order the attacking unit to use Frost Arrow

I want the frost buff to stay. ill figure something out.

Why is this topic in Triggers&Scripts btw and why tagged as [vJASS]?

i have to solve it using vjass though. i already have the autocast detection system anyway.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
I want the frost buff to stay. ill figure something out.

Cold should be a shared buff. So I do not know if you want to avoid to to fiddle with other Cold applying spells. Else take another orb/arrow spell like Black Arrow. Either way, give it a dummy buff that is only for impact detection.

i have to solve it using vjass though. i already have the autocast detection system anyway.

Still, you have not talked of problems with this system and the basic problem exists independently.
 
Level 10
Joined
May 28, 2011
Messages
455
Cold should be a shared buff. So I do not know if you want to avoid to to fiddle with other Cold applying spells. Else take another orb/arrow spell like Black Arrow. Either way, give it a dummy buff that is only for impact detection.

Exactly! Thanks for giving me idea.

Still, you have not talked of problems with this system and the basic problem exists independently

I should? oops. wont happen next time.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Have you already figured out about how to detect the auto-casting spells ?
If not, detect it via Order String

Every spell has their own Order String, even auto-cast spell

Like Frozen Arrows, its Order String for activation is frozenarrows and its deactivation is unfrozenarrows.

Use A unit Is issued with no target for Events, Order string comparison for Conditions
 
Status
Not open for further replies.
Top