Voodoo-ish Control

Pigger

New Member
Reaction score
13
I'm kinda stuck on a problem right now. I am trying to make a spell, that when casted on a unit, makes it so that if the caster moves a certain direction, that the unit that the spell was casted on, will do the same thing, just at it's current position. Anyone have any clues as to how to go about doing this? *Please*
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Hmm... complicated. You could get the distance from the caster to the point he's ordered to move to, then use that distance and the angle from the caster to his point to create another point for the target of the spell and order that unit to move to that point.
 

Pigger

New Member
Reaction score
13
The only thing close that I can really think of are these two triggers:

Code:
Voodoo Control
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Voodoo Control2 
    Actions
        Set VoodooCaster = (Casting unit)
        Set VoodooTarget = (Target unit of ability being cast)
        Trigger - Turn on VoodooMove <gen>
Code:
VoodooMove
    Events
        Unit - A unit Is issued an order targeting a point
    Conditions
        (Unit-type of (Target unit of issued order)) Equal to Troll Voodoo Witch
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Target unit of issued order) Equal to VoodooCaster
                (Issued order) Equal to (Order(smart))
            Then - Actions
                Set VoodooMove = (Target point of issued order)
                Set VoodooTarPoint = ((Position of VoodooTarget) offset by (Distance between (Position of VoodooCaster) and (Position of VoodooTarget)) towards (Angle from (Position of VoodooCaster) to VoodooMove) degrees)
                Unit - Order VoodooTarget to Move To VoodooTarPoint
            Else - Actions

I'm sure I'm probably doing something wrong, actually, I know I am but I assume that this is a start :S
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Code:
(Unit-type of (Target unit of issued order)) Equal to Troll Voodoo Witch

There is no Target unit of issued order. You're targeting a point. That will not register.
 
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