Need help with a trigger for an ability

BEeeH-

New Member
Reaction score
2
Here's a trigger for an ability which displays a range for in this case is Truesight which is 700 in my map.

Trigger:
  • Truesight Range
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to True Sight Range
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Point1 = (Position of (Triggering unit))
          • Set Point2 = (Point1 offset by 700.00 towards (30.00 x (Real((Integer A)))) degrees)
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point2 facing (Position of (Triggering unit))
          • Unit - Move (Last created unit) instantly to Point2, facing (Position of (Triggering unit))
          • Unit - Turn collision for (Last created unit) Off
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation (udg_Point2)
          • Custom script: call RemoveLocation (udg_Point1)


Is there any way to make the Dummys to follow the caster while walking in the same position 700 range away? Atm when someone uses the ability the dummys just popup in a circle and stays there, and you can walk away. It looks kinda weird. Plz help?
 

muzk

Member
Reaction score
3
Make a periodic timer to change dummy position depending caster position ! You can use arrays to store your dummies units

Btw
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point2 facing (Position of (Triggering unit))
Unit - Move (Last created unit) instantly to Point2, facing (Position of (Triggering unit))
------>
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point2 facing (Point1)
Unit - Move (Last created unit) instantly to Point2, facing (Point1)
Else you are leaking two points! ;)
 

TomTTT

New Member
Reaction score
44
muzk said it. Set the units created to variables and make a periodic to move them.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
After the create dummy make a unit variable with arrays, not easy?
Set Dummy[(integer A)] = Last Created unit
Add last created unit to unit group abc or anything you like
And Set Caster = Triggering Unit

Make a trigger that removes the units when they die from the group
with condition
For integer A from 1 to 12 do actions
If Dummy[(integer A)] is dying/triggering unit
Then (Actions)
Remove trigering/dying unit from abc group

And then make another trigger like that

Trigger:
  • Truesight Follow
    • Events
      • Time - Every 0.05 seconds
    • Conditions
      • (Number of units in abc) Not equal to 0
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dummy[(Integer A)] is alive) Equal to True
            • Then - Actions
              • Set Point1 = (Position of (Caster))
              • Set Point2 = (Point1 offset by 700.00 towards (30.00 x (Real((Integer A)))) degrees)
              • Unit - Move (Dummy[(integer A)]) instantly to Point2, facing (Position of (Caster))
              • Custom script: call RemoveLocation (udg_Point2)
              • Custom script: call RemoveLocation (udg_Point1)
            • Else - Actions
 

BEeeH-

New Member
Reaction score
2
Thx it works now!

Position of Casting unit didnt work tho, so i just made a unit variable instead
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top