FANDOM



Reset Henchman on PC logout

What it does

This will run a check every time a client logs out, and if a henchman has no master, it will return said henchman to a predetermined spot. Helpful for PW situations so your henchmen don't end up in the bottom of dungeons etc. when their master logs off.

How to use

Goes in the OnClientLeave event for the module. You'll need one "block" of code for every henchman, and a "start point" waypoint to send them to when their master leaves. Replace "myhenchman" with the tag of your henchman, and replace "myhechman_startpoint" with the tag of the waypoint you want them to return to.

The Script

void main()
{
 object oHench = (GetObjectByTag("myhenchman"));
 object oHenchstart = (GetObjectByTag ( "myhenchman_startpoint" ));
 object oMaster = GetMaster(oHench);
    if (!GetIsObjectValid( oMaster ))
    {
    AssignCommand (oHench, ActionJumpToObject (oHenchstart));
    }
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.