Advertisement
GrandBulwark

Untitled

Mar 1st, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Scriptname Bulwark_Follower_Script_Catchup extends ReferenceAlias
  2.  
  3. int distanceCheck = 2500
  4. ReferenceAlias Property BulwarkFollower Auto
  5.  
  6. EVENT OnCellAttach()
  7. RegisterForUpdate(4.0)
  8. endEVENT
  9.  
  10. EVENT OnCellDetach()
  11. UnregisterForUpdate()
  12. endEVENT
  13.  
  14. Function OnUpdate()
  15. Actor theActor = BulwarkFollower.GetActorReference()
  16. If (theActor.IsPlayerTeammate() && (theActor.GetDistance(Game.GetPlayer())) <= distanceCheck)
  17.  
  18. theActor.Moveto(Game.GetPlayer())
  19. Debug.Messagebox("You are too far, so I have moved to you.")
  20. Endif
  21. EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement