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

A walking unit see as flying unit

Status
Not open for further replies.
Level 24
Joined
Feb 27, 2019
Messages
833
Since there is a certain follow range (about 150) wont the vision be slightly offset? I answered a similar question recently with two suggestions.
 
Level 13
Joined
Oct 28, 2019
Messages
523
  • DwarvenPathfinderVision
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet DwarvenPathPosition = (Position of Dwarfen Pathfinder 0013 <gen>)
      • Unit - Order Flying Dummy 0001 <gen> to Move To ((Position of Dwarfen Pathfinder 0013 <gen>) offset by 256.00 towards (Facing of Dwarfen Pathfinder 0013 <gen>) degrees.)
this worked nice, I will use this
 
Level 24
Joined
Feb 27, 2019
Messages
833
I would never use that because the flying unit will be offset by 256 towards an angle or lagg behind because the event occurs every 2 seconds and what happens if the dwarfen pathfinder teleports or uses blink?

You forgot to remove points correctly so you leak locations. Whenever you set a new point such as a point offset by distance towards an angle it creates a new point. What you should do is:
  • Set dwarvenpathposition[1] = position of dwarfen pathfinder
  • Set dwarvenpathposition[2] = dwarvenpathposition[1] offset by distance towards angle
  • order unit to move to dwarvenpathposition[1]
  • custom script: call RemoveLocation(udg_dwarvenpathposition[1])
  • custom script: call RemoveLocation(udg_dwarvenpathposition[2])
My suggestion is to at least do this down below instead since it works much better and isnt hard to do. Additionally if the dwarfen pathfinder can die and not end the game then when the dwarfen pathfinder dies remove the flying dummy, when it revives create a new dummy.
  • Move dvarfen pathfinder vision
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet TempPoint = (Position of dwarfen pathfinder)
      • Unit - Move flying dummy instantly to TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Status
Not open for further replies.
Top