Skip to content

Persistent worlds henchmen issues

I'm adapting the henchmen's scripts to work in a persistent world.
Is it possible to check if the master of a henchman is currently playing in the server or not?
Generally speaking, is it possible to check if a PC is currently playing in the server or he is disconnected?

Comments

  • FreshLemonBunFreshLemonBun Member Posts: 909
    Assuming you have the player object it should return OBJECT_INVALID. If you want to check if there is a player in the party then you can use Get(First/Next)FactionMember functions, for example if the henchman goes home if no player is around. If you specifically want to check and act on a specific player or character being present then you'd probably save the "ownership" of the henchman as local or database variables. When to act on it depends but there are various events that could be useful, OnClientLeave for example or the module or NPC heartbeat.
Sign In or Register to comment.