Пользовательские дополнения

На главную


object.IsInteractable( objectId )

Проверяет возможно ли попытаться взаимодействовать (разговор, услуги, получение заданий и тп) с объектом.

Проверяется состояние объекта, его видимость, расстояние до аватара и тп.

Из наличия возможности не следует наличие доступных взаимодействий, для полной проверки используйте object.GetInteractorInfo( objectId )

-- библиотека
object

-- объявление
function IsInteractable( objectId )

-- параметры
objectId: ObjectId - идентификатор объекта

-- возвращаемые значения
boolean: возможно ли взаимодействие с объектом

-- пример
if object.IsInteractable( objectId ) and object.GetInteractorInfo( objectId ).hasInteraction then
  avatar.StartInteract( objectId )
end

Связанные страницы: "CategoryLuaApi" "CategoryInteraction"

EnumLearnError
EnumVendor
EventInteractionStarted
EventItemsExchangeDeclineIgnored
EventItemsExchangeError
EventItemsExchangeFinished
EventItemsExchangeInvited
EventItemsExchangeOfferFinalConfirmedChanged
EventItemsExchangeOfferItemsChanged
EventItemsExchangeOfferMoneyChanged
EventItemsExchangeOfferPrimaryConfirmedChanged
EventItemsExchangeSlotIsBusy
EventItemsExchangeStarted
EventItemsExchangeStateChanged
EventTalkStarted
EventTalkStopped
EventTrainerLearnError
EventVendorBuyNotEnoughPlace
EventVendorBuyReputationIsTooSmall
EventVendorBuyRequiredAchievement
EventVendorItemAlreadySold
EventVendorItemNotForSale
EventVendorListUpdated
FunctionAvatarBuy
FunctionAvatarBuyToSlot
FunctionAvatarGetInteractorCue
FunctionAvatarGetInteractorCurrentLocations
FunctionAvatarGetInteractorInfo
FunctionAvatarGetInteractorNextCues
FunctionAvatarGetInteractorTeleportLocations
FunctionAvatarGetInterlocutor
FunctionAvatarGetSecondhandList
FunctionAvatarGetTeleportLocationInfo
FunctionAvatarGetTeleportLocations
FunctionAvatarGetVendorBuyback
FunctionAvatarGetVendorList
FunctionAvatarHasInteractorCue
FunctionAvatarHasInteractorQuest
FunctionAvatarIsInteractorRootCue
FunctionAvatarIsInteractorTrainer
FunctionAvatarIsInteractorVendor
FunctionAvatarIsTalking
FunctionAvatarIsTeleportLocationValid
FunctionAvatarRequestInteractions
FunctionAvatarRequestVendor
FunctionAvatarReturnToStartCue
FunctionAvatarSelectInteractorCue
FunctionAvatarStartInteract
FunctionAvatarStopInteract
FunctionAvatarTeleportToLocation
FunctionInteractionCancelExchange
FunctionInteractionGetExchangeInvited
FunctionInteractionGetExchangeInviter
FunctionInteractionGetExchangeSlotCount
FunctionInteractionHasExchange
FunctionInteractionInviteToExchange
FunctionInteractionIsAvatarExchangeInviter
FunctionInteractionIsExchangeInInvitation
FunctionInteractionIsExchangeInProgress
FunctionInteractionRemoveExchangeItem
FunctionObjectGetInteractorInfo
FunctionObjectHasMobVisual
FunctionObjectHasQuest
FunctionObjectHasWorldSecret
FunctionObjectIsInteractable
FunctionObjectIsVendor
FunctionUnitGetTrainerClass
FunctionUnitIsTrainer
ItemsExchangeState


CategoryLuaApi CategoryFunction CategoryInteraction CategoryObject

На главную