HorseGetIsAMount(object)

Check whether a creature is a mount.

int HorseGetIsAMount(
    object oTarget
);

Parameters

oTarget

The creature to be checked.


Description

This will return TRUE if the target is a mountable creature.



Remarks

The fact that a creature is mountable does not necessarily mean that anyone can ride it.

Use HorseGetCanBeMounted to test whether a potential rider is eligible.


Known Bugs

None


Requirements

#include "x3_inc_horse"

Version

1.69

Example

// Called from a conversation.  oPC will check to see if oHorse is a horse.
//  If it is, time to mount up and go for a ride. 
 	
#include "x3_inc_horse"
void main()
{
  object oPC = GetPCSpeaker(); 
  object oHorse = GetObjectByTag("tag of an existing horse");

  if(HorseGetIsAMount(oHorse))
  {
    AssignCommand(oPC, HorseMount(oHorse));
  }
}

See Also

functions:  HorseGetCanBeMounted | HorseMount
categories:  Horse Functions


author: Proleric, editor: Mistress