Difference between revisions of "Talk:GetRider"
Jump to navigation
Jump to search
Answered ABO and fixed indentation
imported>ABO |
imported>QQuix (Answered ABO and fixed indentation) |
||
Line 13: | Line 13: | ||
:[[User:QQuix|QQuix]] 10:34, 3 August 2009 (EDT) | :[[User:QQuix|QQuix]] 10:34, 3 August 2009 (EDT) | ||
: Yeah, sorry it does work and my code that didn't work was probably using it wrong. The following code didn't seem to ever detect when being ridden: | :: Yeah, sorry it does work and my code that didn't work was probably using it wrong. The following code didn't seem to ever detect when being ridden: | ||
<dl><dd> | <dl><dd><dl><dd> | ||
if (getRider == 0) | if (getRider == 0) | ||
; do something when we are not being ridden | ; do something when we are not being ridden | ||
Line 20: | Line 20: | ||
; do something when we are being ridden | ; do something when we are being ridden | ||
endif | endif | ||
<dl> | </dl></dl> | ||
However assigning 'tempRef = getRider' seems to work correctly. | ::However assigning 'tempRef = getRider' seems to work correctly. [[User:ABO|ABO]] 09:19, 5 August 2009 (EDT) | ||
[[User:ABO|ABO]] 09:19, 5 August 2009 (EDT) | |||
:::For the record (since you seem to have a working solution): I placed your code in the gamemode block of the horse script and it does work for me. | |||
:::Note that in the OnActivate block it would work kind of in reverse: when the player/NPC activates the horse, it returns 0 (as the horse is not being ridden yet). When activated again to dismount, it returns the ref to the actor that is dismounting. GetActionRef does return the mounting actor. [[User:QQuix|QQuix]] 13:05, 5 August 2009 (EDT) |