A walking unit see as flying unit

Status
Not open for further replies.
Since there is a certain follow range (about 150) wont the vision be slightly offset? I answered a similar question recently with two suggestions.
 
  • 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
 
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.
Back
Top