Warcraft III resources & community, 2003–2006 · archived

Coding problem

10 posts
#1

Coding problem

How may I disable (or alter) the execution of a standard spell like web, when "auto-cast" is enabled?

I want to rewrite the way of execution via JASS, but as the unit casts it' spell automatically, pointing out a target by itself, my code is beíng overridden.
#2
try using a spell like ensnare?

i dont think you can detect AI casts vs normal casts
#3
How may I alter the spell "ensnare", so that the player can activate "auto-cast" for it?
With that shiny golden light rotating around the button?

And you got me wrong:
I do not want to detect AI casts.
I want to disable AI casts.

But only for this certain spell.
#4
if you want to DISABLE them, then use a spell like ensnare that DOES NOT have auto-cast =)

even better, use a spell like "channel" that doesnt do anything, so the AI refuses to use it, then use triggers to make the proper spell to be cast by a dummy
#5
I have to work over my language. Nobody understands me. ^^

I want the spell to look like it whould be auto-casted!
With a button that can be right-clicked to make that little light appear or disappear.

I can catch the activation/deactivation-string and write an auto-cast function by myself, but I need the normal auto-cast function to be disabled!
#6
Make some nothing-doing autocast spell. Then make trigger triggered by ability being cast and then use a dummy and cast that spell you want on target of ability being cast

NOTE: that nothing-doing ability shall have duration 0.01
#7
So far...
But how may I realize, that the player can still left-click on the button and select a target manually?

I can catch the issued order with ease, but how to use the pure "click-on-button" event?
As "heal" cannot be cast on healthy units and "inner fire" whould be auto-casted in fights as well as "bloodlust"...

... May it work to use an "arrow" ability like "incinerate arrow" or "cold arrow"?
I could make it be castable only on friendly units but the unit whould not really attack it's allies, whould it?

It looks like that is it... I hope it is.
#8
If you remake any of that abilities to do nothing, that will work same if it will be autocasted as if you target manually
#9
and when working with "dummy" autocast abilities, you must remember that each one takes its own activation event

Eg. Heal -> a nearby valid target is at < Max Life

Eg. Bloodlust -> A nearby friendly Unit is attacked

Eg. Web -> A valid target enters cast range

and so on...
#10
It works with "flaming arrows".
There is no activation event for friendly units. ^^

Thanks for thinking over it.