Difference between revisions of "Talk:GetRider"
Jump to navigation
Jump to search
imported>ABO (Asked for clarification and working status.) |
imported>QQuix (Answering ABO) |
||
Line 1: | Line 1: | ||
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? [[User:ABO|ABO]] 09:13, 3 August 2009 (EDT) | 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? [[User:ABO|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: | |||
<dl><dd> | |||
;*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 | |||
</dl> | |||
:[[User:QQuix|QQuix]] 10:34, 3 August 2009 (EDT) |
Revision as of 09:34, 3 August 2009
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)