HorseRestoreInventory(object, int)

Return inventory (saddlebags) to a horse.

void HorseRestoreInventory(
    object oCreature,
    int bDrop=FALSE
);

Parameters

oCreature

The creature whose inventory is to be restored.

bDrop

If TRUE, the contents are dropped where the horse is, rather than on the horse.


Description

This function is used to return inventory stored by HorseStoreInventory to the horse.

The option to drop the inventory at the horse's location is primarily intended for cases where a mounted PC dies.



Remarks

This function only required if you have a custom dismount routine which needs to handle saddlebags, or custom OnPlayerDying and OnPlayerDeath scripts which could leave saddlebags in limbo.

It follows the exactly the same rules as the standard scripts.


Requirements

#include "x3_inc_horse"

Version

1.69

Example

#include "x3_inc_horse"


void main()
{
   object oHorse = GetObjectByTag("tag of an existing horse"); 

   HorseRestoreInventory(oHorse);
}

See Also

functions:  HorseStoreInventory
categories:  Horse Functions


author: Proleric, editor: Mistress