HorseGetHasAHorse
From NWN Lexicon
Contents |
[edit] HorseGetHasAHorse(object)
Check if a creature has a horse.
int HorseGetHasAHorse( object oRider );
[edit] Parameters
oRider
The creature to be checked.
[edit] Description
This function will return TRUE if oRider has a horse.
[edit] 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.
[edit] Requirements
#include " x3_inc_horse "
[edit] Version
1.69
[edit] 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))); } }
[edit] See Also
functions: |
author: Proleric, editor: Mistress