Skip to content

OnHorseUnhitch ​

Usage ​

  • Return a non-null value to override default behavior

Example Autogenerated ​

csharp
private void OnHorseUnhitch( IHitchable hitchable, HitchSpot hitchSpot )
{
    Puts( "OnHorseUnhitch works!" );
}

Location ​

  • HitchTrough::UnHitch(HitchTrough/IHitchable hitchable)
csharp
//---
	for (int i = 0; i < array.Length; i++)
	{
		HitchTrough.HitchSpot hitchSpot = array[i];
		if (hitchSpot.GetHitchable(base.isServer) == hitchable)
		{
			if (Interface.CallHook("OnHorseUnhitch", hitchable, hitchSpot) != null)
			{
				return;
			}
			hitchSpot.SetOccupiedBy(null);
			hitchable.SetHitch(null, null);
//---

Released under the MIT License.