HorseRestoreHenchmenLocations(object)

Locate henchman's horses correctly.

void HorseRestoreHenchmenLocations(
    object oPC
);

Parameters

oPC

The PC whose henchmen's horses are to be restored.


Description

This function will check the module variable X3_RESTORE_HENCHMEN_LOCATIONS which when set to TRUE on the module will cause this function to jump any NPC henchmen to the PC and will also make sure their henchmen also jump.



Remarks

This function is probably only necessary when loading a saved game, and is already included in the default OnClientEnter script x3_mod_def_enter.

Normally, the location of henchmen and their horses is managed by the default transition script nw_g0_transition.

It is assumed that the henchman that is their master will already be at the proper location due to a reload or due to a respawn from some special script for the server.


Known Bugs

HorseRestoreHenchmenLocations will actually NOT jump henchmen to the PC. Its primary purpose is to make sure that mounts belonging to the henchman are jumped to the proper location.


Requirements

#include "x3_inc_horse"

Version

1.69

Example

// Sample OnClientEnter script. See x3_mod_def_enter for the full context.
#include "x3_inc_horse"


void main()
{
    object oPC = GetEnteringObject();
 
    DelayCommand(5.0, HorseRestoreHenchmenLocations(oPC));    
}

See Also

functions:  HorseAddHorseMenu
categories:  Horse Functions


author: Proleric, editor: Mistress