Talk:GetRider

From the Oblivion ConstructionSet Wiki
Revision as of 09:34, 3 August 2009 by imported>QQuix (Answering ABO)
Jump to navigation Jump to search

This appears to not be working for me using OBSE 0017b... did it ever work? What is it supposed to return if the horse is being ridden by the player? What is it supposed to return if no one is riding the horse? What is supposed to happen if it is called on something that isn't a horse? ABO 09:13, 3 August 2009 (EDT)

It works for me both in OBSE v17b and v18. It correctly returns the player or NPC reference. Returns a null reference if there is no one riding the horse. Returns a null reference if called on an NPC or on a container. Used this code for testing:
 ;*Player mounts the horse* set xRef to MyHorse.GetRider PrintToConsole "Rider = %i %n" xRef xRef ;Shows Player FormID and Name  ;*Player dismounts the horse* MyHorse.activate MyNPC 1  ; MyNPC mounts the horse set xRef to MyHorse.GetRider PrintToConsole "Rider = %i %n" xRef xRef ;Shows MyNPC FormID and Name
QQuix 10:34, 3 August 2009 (EDT)