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

How do I make a trigger make a unit cast a spell (targeted)?

Status
Not open for further replies.
Level 1
Joined
May 17, 2005
Messages
6
The 'unit-order unit to x targeting y' only seems to work with non custom spells, and not very well at that.. What are you guys using?

Allllso...

How do I enable/disable spells autotargeting with a trigger and without a trigger, and, can a spell(triggered) be cast on a unit that is not in line of sight? If not how can I change that?

Just another map making nub..
 
Level 1
Joined
May 17, 2005
Messages
6
Okay I got the trigger part to work, so it will cast on demand..

Still need to get rid of autocast, or changing the autocast aquire target range to 0 would be nice (or does it use the units aquire range for this? I'll check).

Lastly, I need the spell to cast without the LOS requirement. I don't wanna use dummy units since LOS is of very high value in my map.
 
Level 1
Joined
May 17, 2005
Messages
6
For reference:
Default active ability= default autocast ability
Autocast range acts only within the units target aquistion range (which also affect combat).
Casting Time set to 0 = never cast
The maximum rate of casts a unit can be hit by an autocast is a factor of both buff duration and casting time.
You can make a LOS-independant spell by using map triggers and a 3rd party(like, Nut. Hostile) w/ full map LOS. Getting credit for the kill, if the spell does damage, might be a problem tho.

If you can set the variable with a trigger- default active ability- you can in effect enable/disable autocasting.

I thought I would get more help than this :(
 
Level 13
Joined
Dec 29, 2004
Messages
597
If you wanna cast spell on unit that out of sight range, you should use trigger. You can make it like this:

Pick every unit that you want,
damage them,
create special effect on them.

Of course if the spell just causing damage not other buff like slow stun.

If your spell are causing effect like slow or anything, you should use dummy unit. I don't find anyway, but whats the matter with dummy unit LOS? because after several seconds it will die, and its LOS will gone too.
 
Level 1
Joined
May 17, 2005
Messages
6
Leopard said:
If your spell are causing effect like slow or anything, you should use dummy unit. I don't find anyway, but whats the matter with dummy unit LOS? because after several seconds it will die, and its LOS will gone too.
Because thats exactly what im using..
it looks something like this so far:

unit- a unit does x event
condition- triggering unit is of type very-important-hide-n-go-seek-unit
condition- random integer from 1 to 10 = 1
action- order all units of type z owned by enemy of owner of trigering unit and do cast x on triggering unit(uses altered WE triggers for custom spells)

Currently im only using debuffs, which aren't that important, but soon I'll be adding damage spells..
I figure one workaround is if could make the spell a very low AOE targetless that casts on point instead of a target............. I know for the damage component I can create a dummy unit with splash, instant missles, unlimited range, yatta yatta....
 
Status
Not open for further replies.
Top