No categories assigned
LUA:SetFollowTarget
- Last edited 12 years ago by I need to Update My Profile
LUA Functions: SetFollowTarget()
Sets the spawns follow target
Syntax
SetFollowTarget(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (Spawn)
- param1 is the spawn that will be following the other
- param2 is the spawn that the first is following
Usage
function hailed(NPC, Player)
SetFollowTarget(NPC, Player)
if not IsFollowing(NPC) then
ToggleFollow(NPC)
end
end
This spawn script will have the spawn follow the last player to hail it.
Notes
Setting a follow target will not make the spawn follow it, for the spawn to start following you need to call ToggleFollow()