View Single Post
10/25/23, 12:06 PM   #2
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 181
Originally Posted by sinnereso View Post
Code:
local _, isRidingGroupMount, hasFreePassengerSlot = GetTargetMountedStateInfo(playerDisplayName)
Returns true / true for isRidingGroupMount / hasFreePassengerSlot when the "playerDisplayName" has ONLY selected a dual rider mount in collections and is NOT mounted.

Will return false / false ONLY if "playerDisplayName" has a regular single seat mount selected in collections.
isRidingGroupMountis a bit poorly named. It actually should be called hasActiveGroupMount, because it just refers to what kind of mount you've equipped in collections, not whether or not you are mounted currently. That's what the first arg you're ignoring is for. This is how we do it in vanilla:

Code:
local mountedState, isRidingGroupMount = GetTargetMountedStateInfo(currentTargetCharacterNameRaw)
local isPassengerForTarget = IsGroupMountPassengerForTarget(currentTargetCharacterNameRaw)
local groupMountEnabled = (mountedState == MOUNTED_STATE_MOUNT_RIDER and isRidingGroupMount and (not IsMounted() or isPassengerForTarget))
  Reply With Quote