Trigger connected to spell doesn't work

Necrach

You can change this now in User CP.
Reaction score
62
I am making a trigger bound to a skill. It is supposed to work like this: After using the spell at an enemy, he starts attacking a nearby friend (if there is any, otherwise the spell is wasted.) He should do so until ordered a new order, eg the spell will be effective against players that doesn't notice the effect (and against neutral hostile units.)

I made the spell out of some simple skill, think it was either Ensnare or Cripple. The range of the spell is 99999, as you should be able to use it on a unit anywhere on the map.



And here is the trigger (the spell is named Turncoat)

EVENTS
Unit - A unit begins casting an ability
CONDITIONS
(Ability being cast) Equal to Turncoat
ACTIONS
Special effect (doesn't matter)
Unit - Order (Target unit of ability being cast) to Attack (Random unit from (Units within 900 of (Target point of ability being cast) matching (((Matching unit) is in (Units owned by (Owner of (Target unit of ability being cast)))) Equal to True)))

And now here is the problem: Sometimes the spell doesn't hae any effect at all even if there is friendly units nearby the target (the effect is still shown) I suppose it has something to do with the "Random unit from unit group", but how can I do this otherwise?

And I haven't tested the spell in many ways yet, so if you think there will be more bugs in it, please tell me.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
there could be a few problims wrong with this, firstly does the spell ever work? Has the unit ever attacked it's own units?

You also need to remember that the unit that was cast on is in that area and is owned by it's owner, so with the trigger you posted, the targeted unit can be ordered to attack him self.
 

Necrach

You can change this now in User CP.
Reaction score
62
That should be it, at least one of the problems :s Yes, the spell works most of the time. However, after testing some more times (with several neutral hostile units and just a pair of neutral hostile units) it seems that it more rarely works when there is an enemy nearby to attack.

I think the spell has to be made in another way. Ideas?

Any kind of temporary attack allies/domination spell would work, but there is one problem; all units you can control (with a few exceptions) are Heroes, although you have up to ten of them. And you should be able to revive them. So therefore changing player control, even for a short period of time, could be complicated when I want the original owner of the hero to be able to revive it.
 
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