• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Minimal Range Question

Status
Not open for further replies.
Level 5
Joined
Dec 11, 2010
Messages
101
Hello, was wondering if there was a way to work this trigger.
I'm pretty bad at certain triggers, and was needing help.

Okay, so a unit has 0-1000 range, but what I would was to know is if a unit comes within 400 range of the my unit (in this case, Sniper), Sniper gets a 50% miss chance on JUST that target, changing targets will give him his range back.
(Planning on having a skill that increases his range if this changes anything)

^ I think I can already tell this sounds almost like its set up how it should be, but having a little difficulty with the setup.
Thanks :)

:ogre_datass:
 
Level 12
Joined
May 20, 2009
Messages
822
I think you'd do something like:

  • Untitled Trigger 003
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to YOUR_UNIT
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Issued order) Equal to (Order(attack))
              • (Issued order) Equal to (Order(smart))
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Target unit of issued order) is in (Units within 400.00 of (Position of (Ordered unit)))) Equal to True
            • Then - Actions
              • Unit - Create 1 DUMMY_UNIT for (Owner of (Ordered unit)) at (Position of (Ordered unit)) facing (Position of (Ordered unit))
              • Unit - Order (Last created unit) to Undead Banshee - Curse (Ordered unit)
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Target unit of issued order) is in (Units within 400.00 of (Position of (Ordered unit)))) Equal to False
                • Then - Actions
                  • Unit - Remove Curse buff from (Ordered unit)
                • Else - Actions
        • Else - Actions
That should work.

Now, to set up your DUMMY unit, you make sure:

Art - Model File = BlankModel.Mdx
Art - Shadow Image (Unit) = None
Art - Animation - Cast Backswing = 0
Art - Animation - Cast Point = 0
Combat - Attacks Enabled = No attacks

And You make sure it has the Locust (Aloc) ability.
 
Status
Not open for further replies.
Top