HorseGetIsMounted(object)

Check if a creature is mounted.

int HorseGetIsMounted(
    object oTarget
);

Parameters

oTarget

The creature to be checked.


Description

This function will return TRUE if the target is mounted.



Requirements

#include "x3_inc_horse"

Version

1.69

Example

// Called from a conversation.  If the player is currently mounted, have them dismount.  	
#include "x3_inc_horse"

// Dummy function that accepts an object and returns void, so that it can be assigned as an action.
void ObjectWrapper(object oObject) 
{   return;   }

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

  if(HorseGetIsMounted(oPC))
  {
    AssignCommand(oPC, ObjectWrapper(HorseDismount()));
  }
}

See Also

functions:  HorseGetCanBeMounted | HorseGetIsAMount | HorseGetHasAHorse
categories:  Horse Functions


author: Proleric, editor: Mistress