Advertisement
GrandBulwark

Untitled

Mar 1st, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Scriptname Bulwark_Follower_Script_Catchup extends Actor
  2.  
  3. int distanceCheck = 2500
  4.  
  5. EVENT OnCellAttach()
  6. RegisterForUpdate(15.0) ; This script will update every (2) seconds
  7. endEVENT
  8.  
  9. EVENT OnCellDetach()
  10. UnregisterForUpdate()
  11. endEVENT
  12.  
  13. Function OnUpdate()
  14. If (Self.IsPlayerTeammate() && (Game.GetPlayer().GetDistance(Self)) <= distanceCheck)
  15.  
  16. Self.Moveto(Game.GetPlayer())
  17.  
  18. Endif
  19. EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement