• 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.

[Solved] Flying unit is dropping item inside of moutain.

Status
Not open for further replies.
Level 9
Joined
Mar 2, 2014
Messages
160
I have Deadwing in map and after he die he drops Item Demon Soul.
But if he dies above mountain that item can be stuck inside because I made pathing blockers only on edge of mountains.
Pathing map look like this:
uh pathing.jpg
Obvious solution is to fill mountains with pathing blockers completelly but is it best solution? - could too many blockers affect performance?
Should I make custom pathing blocker with pathing of town hall to fill mountains more easily?
Since there is only one flying unit dropping items in game maybe I should make trigger comparing tilesets where deadwing dies and if it is on mountain tileset it could drop item on non-mountain tilesets nearby (but I do not know how to make that "drop on non-mountain nearby" part of trigger.

Any insight on this problem is appreciated.

And I am gui user.
 
Level 30
Joined
Aug 29, 2012
Messages
1,383
One solution would be to allow heroes to pick up that item at any distance, provided they have vision of the area (given your mountains seem not to be the default cliff ones, units should be able to see the item if it lands there):

  • Item
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(smart))
      • (Item-type of (Target item of issued order)) Equal to Celestial Orb of Souls
    • Actions
      • Hero - Give (Target item of issued order) to (Triggering unit)
You can disable this trigger if you want it to only happen once (when the item is first dropped for instance). That way you don't have to deal with detecting where it lands and whatnot
 
Level 9
Joined
Mar 2, 2014
Messages
160
Thanks, it workes perfectly.
I also wanted it to activate only if that problem happens so there is how it is done for anyone interested:
  • DW dies on mountain
    • Events
      • Unit - Deadwing - Aspect of Death 0500 <gen> Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Lordaeron Summer - Rock
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Lordaeron Fall - Rock
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Lordaeron Winter - Rock
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Barrens - Rock
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Barrens - Rock
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Ashenvale - Rock
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Felwood - Rock
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Northrend - Rock
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Village - Rocks
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Village Fall - Rocks
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Outland - Rock
          • (Terrain type at (Position of Deadwing - Aspect of Death 0500 <gen>)) Equal to Northrend - Rocky Snow
    • Actions
      • Trigger - Turn on DW fix <gen>
-I did not remember which rocks I used as mountain so I just listed all
  • DW fix
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(smart))
      • (Item-type of (Target item of issued order)) Equal to Dragon Soul
    • Actions
      • Hero - Give (Target item of issued order) to (Triggering unit)
      • Trigger - Turn off (This trigger)
solved
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
That condition leaks 12 points every time it runs because the points are created in a condition. Probably only runs once but for completeness:
  • DW dies on mountain
    • Events
      • Unit - Deadwing - Aspect of Death 0500 <gen> Dies
    • Conditions
    • Actions
      • Set TempPoint = (Position of Deadwing - Aspect of Death 0500 <gen>)
      • If (All conditions are true) then do (Then actions) else do (Else actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Terrain type at TempPoint) Equal to Lordaeron Summer - Rock
              • (Terrain type at TempPoint) Equal to Lordaeron Fall - Rock
              • (Terrain type at TempPoint) Equal to Lordaeron Winter - Rock
              • (Terrain type at TempPoint) Equal to Barrens - Rock
              • (Terrain type at TempPoint) Equal to Barrens - Rock
              • (Terrain type at TempPoint) Equal to Ashenvale - Rock
              • (Terrain type at TempPoint) Equal to Felwood - Rock
              • (Terrain type at TempPoint) Equal to Northrend - Rock
              • (Terrain type at TempPoint) Equal to Village - Rocks
              • (Terrain type at TempPoint) Equal to Village Fall - Rocks
              • (Terrain type at TempPoint) Equal to Outland - Rock
              • (Terrain type at TempPoint) Equal to Northrend - Rocky Snow
        • Then - Actions
          • Trigger - Turn on DW fix <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Status
Not open for further replies.
Top