HorseStoreInventory(object, object)

Store a horse's inventory (saddlebags).

void HorseStoreInventory(
    object oCreature,
    object oRider = OBJECT_INVALID
);

Parameters

oCreature

The creature whose inventory is to be stored.

oRider

If a rider is specified, the container tag or data base identifier is stored in a local string "sDB_Inv" on that object.


Description

This function is used to store inventory of the horse for later recovery.



Remarks

This function only required if you have a custom mount routine which needs to handle saddlebags.

After mounting, the horse object no longer exists, so the inventory has to be stored somewhere (which is identified by the module settings).

This is performed automatically by the standard mount routine, if saddlebags are enabled.

The function stores the creature's inventory in a container or a data base, following the exactly the same rules as the standard mount routine.

It does not check whether saddlebags are enabled.


Requirements

#include "x3_inc_horse"

Version

1.69

Example

#include "x3_inc_horse"


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

   HorseStoreInventory(oHorse);
}

See Also

functions:  HorseRestoreInventory
categories:  Horse Functions


author: Proleric, editor: Mistress