• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Get Destructable In Front

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
u tryed something like this?

  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feral Spirit
    • Actions
      • Set U = (Triggering unit)
      • Set Ang = (Facing of U)
      • Set P1 = (Position of U)
      • Destructible - Pick every destructible within 600.00 of P1 and do (Actions)
        • Loop - Actions
          • Set D = (Picked destructible)
          • Set P2 = (Position of D)
          • Set DAng = (Angle from P1 to P2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Ang Equal to DAng
            • Then - Actions
              • -------- i guess the 1st destructible who apply to this condition --------
              • -------- will be the closest --------
              • -------- if no then : --------
            • Else - Actions
          • Custom script: call RemoveLocation(udg_P2)
      • Custom script: call RemoveLocation(udg_P1)
whatever better if u use a interval instead exact comparation, like Ang-Dang < 10 and Ang-Dang > -10
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Sorry, been busy with exams.
It works, but not perfectly. This happened:

wc3scrnshot111912115853.jpg

As you can see, I used the ability and the wrong tree got picked.
Thanks though!
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
coz maybe u need different range like this
  • Actions
    • Set p1 = ((Position of (Triggering unit)) offset by 50.00 towards ((Facing of (Triggering unit)) + 90.00) degrees)
    • Set p2 = ((Position of (Triggering unit)) offset by 50.00 towards ((Facing of (Triggering unit)) - 90.00) degrees)
    • Set p3 = (p1 offset by Range towards (Facing of (Triggering unit)) degrees)
    • Set p4 = (p2 offset by Range towards (Facing of (Triggering unit)) degrees)
y ofc needed a leak fix but the ideea is make a region and check if destructible is there, the last example made something like a triangle range (at caster the area is smaller but at bugger distance area is bigger and bigger thats why dont picked the the close tree if it isnt exactly in this area)

i think this is the reason

u made something like A. but u need something like B. i guess (sorry i am not pcasso but maybe u got the ideea)

Hashjie, me, maker and others made function what check if unit is between 4 point, but idk the link
 

Attachments

  • 2222222222.JPG
    2222222222.JPG
    14.3 KB · Views: 97
Level 14
Joined
Apr 20, 2009
Messages
1,543
Shadow, I'm searching through my entire hard disk for that code right now. It is lost somewhere in space >.<
Hold up, I'll have it in a few minutes...

I loved the way you worked out that function, let me just check if I can find the thread.

EDIT: Ah! there it is http://www.hiveworkshop.com/forums/...98/question-about-invisible-platforms-212271/
I might recreate the bridge system now that I have some experience in vJass...
If I can get some things to work I might even give a shot at creating a 3D pathing concept. But for now I have other plans and things to work on :/

Hey Kyousuke Imadori ;) Did you check out my PM yet?
 
Last edited:
Status
Not open for further replies.
Top