Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname Bulwark_Follower_Script_Catchup extends ReferenceAlias
- int distanceCheck = 2500
- ReferenceAlias Property BulwarkFollower Auto
- EVENT OnCellAttach()
- RegisterForUpdate(4.0)
- endEVENT
- EVENT OnCellDetach()
- UnregisterForUpdate()
- endEVENT
- Function OnUpdate()
- Actor theActor = BulwarkFollower.GetActorReference()
- If (theActor.IsPlayerTeammate() && (theActor.GetDistance(Game.GetPlayer())) <= distanceCheck)
- theActor.Moveto(Game.GetPlayer())
- Debug.Messagebox("You are too far, so I have moved to you.")
- Endif
- EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement