triggering spell questions

Emu.Man00

New Member
Reaction score
41
So im trying to make it so if a hero casts a target spell he will cast it on a different target, instead of the one that he chose
so my action was this

Code:
Unit - Order (Casting unit) to [B]Neutral - Devour[/B] (Random unit from (Units within 600.00 of (Position of (Target unit of ability being cast))))

when you try to change the spell he casts, you cant use variables or event responses, so how can i make it cast whatever spell he tried to use in the first place :S
 

Some1Sneakin

New Member
Reaction score
5
Jass is actually very easy, i learned it in one hour. Now i just have to learn all those pre-made functios >.<
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Jass? Create a dummy spell which does nothing, proper tooltips and so on of course.

Whenever a unit starts the effect of this dummy ability, create a dummy unit at position of triggering unit, order it to cast on a random unit within 600 around the target of ability being cast. But this might end up with the real target gets to be the target, well, if you want it like this, no problem, if not you need to pick all units within 600 range... add all into a unit group, remove target unit of ability being cast from unit group, pick one random unit from the unit group. Feel me? (you need a unitgroup anyway, but the second option requires two unit groups if you want it leak free)

>>when you try to change the spell he casts, you cant use variables or event responses

What? You want to apply this thing, for more than one spell? And you want to keep it simple, with only 1 trigger for all the spells? No problem, if so, ask?
Have I misunderstood?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top