Advertisement
GrandBulwark

Untitled

Mar 1st, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Scriptname Bulwark_Follower_Script_Catchup extends ObjectReference
  2.  
  3. int distanceCheck = 2500
  4. bool breakLoop
  5.  
  6. EVENT onLoad()
  7. UpdateLoop() ; This script will update every (2) seconds
  8. endEVENT
  9.  
  10. EVENT onUnload()
  11. breakLoop = True
  12. endEVENT
  13.  
  14. Function UpdateLoop()
  15. While (Self.IsPlayerTeammate() && !breakLoop)
  16. if (getDistance(game.getplayer()) <= distanceCheck)
  17. Self.Moveto(Game.GetPlayer())
  18. EndIf
  19. Utility.Wait(2)
  20. EndWhile
  21. breakLoop = False
  22. EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement