HorseGetHasAHorse(object)

Check if a creature has a horse.

int HorseGetHasAHorse(
    object oRider
);

Parameters

oRider

The creature to be checked.


Description

This function will return TRUE if oRider has a horse.



Remarks

If the target is mounted, the horse they are riding doesn't count, because it doesn't exist as a horse object. The function will only return TRUE if the owner has one or more dismounted horses.


Requirements

#include "x3_inc_horse"

Version

1.69

Example

// Mount the first horse owned by the PC if there is one
#include "x3_inc_horse"


void main()
{
  object oPC = GetEnteringObject();

  if(HorseGetHasAHorse(oPC))
  {
    AssignCommand(oPC, HorseMount(HorseGetHorse(oPC)));
  }    
}

See Also

functions:  HorseGetIsMounted | HorseGetHorse | HorseGetMyHorse
categories:  Horse Functions


author: Proleric, editor: Mistress