HorseHitchHorses(object, object, location)

Hitch a party's horses.

void HorseHitchHorses(
    object oHitch,
    object oClicker,   
    location lPreJump
);

Parameters

oHitch

An object to hitch horses/mounts near. If it is OBJECT_INVALID then it will be ignored.

oClicker

The PC whose horses are to be hitched.

lPreJump

A location which the horses should stay near (actually walk a small distance away from) if no hitching object is specified.


Description

This function is designed to be used in conjunction with a transition script.



Remarks

This is the standard hitching code, which you can use in any situation which calls for removing and hitching the party's horses (not just in transition scripts).

It will hitch any dismounted horses owned by the PC and their henchmen.

It doesn't check whether hitching is necessary - it assumes you've already decided that.

It doesn't dismount anyone, either - if it's possible that the party is mounted, you must dismount them, and allow time for this before calling this function.

Time must be allowed for hitching to complete before taking any subsequent action.

In the nw_g0_transition implementation, the standard code looks for a hitching post placeable or waypoint to use as the hitching object; if it doesn't find one, it uses the transition location as the point to move away from.


Requirements

#include "x3_inc_horse"

Version

1.69

Example

#include "x3_inc_horse"

void main()
{
  object   oPC = GetClickingObject();
  object   oHitchingPost = GetObjectByTag("enter hitching post tag here");
  location lHitchingPost = GetLocation(oHitchingPost);  // Just to satisfy the function syntax. 
  
  HorseHitchHorses(oHitchingPost, oPC, lHitchingPost);
}

See Also

functions:  HorseDismount
categories:  Horse Functions


author: Proleric, editor: Mistress