HorseHitchHorses(object, object, location)

Hitch a party's horses.

void HorseHitchHorses(
    object oHitch,
    object oClicker,   
    location lPreJump



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


The PC whose horses are to be hitched.


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


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


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.


#include "x3_inc_horse"




#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