View Single Post
06/17/23, 04:36 PM   #3
IsJustaGhost
AddOn Author - Click to view addons
Join Date: May 2020
Posts: 38
My lib would be extremely helpful here.
I'm almost ready to post the update to it.
It's current version has been completely rewritten.

Lua Code:
  1. local registerOnTryHandlingInteraction = LibInteractionHook.RegisterOnTryHandlingInteraction
  2. local hideInteraction = LibInteractionHook.HideInteraction
  3.  
  4. local wayshrineString = tolower(GetString(SI_DEATH_PROMPT_WAYSHRINE))
  5.  
  6. -- I'm not sure if the wayshrineString  will need to be lowered. On the save side, lower both.
  7.  
  8.  
  9. registerOnTryHandlingInteraction(self.name, SI_LIB_IF_GAMECAMERAACTION5, function(action, interactableName, currentFrameTimeSeconds)
  10.     if tolower(interactableName):match(wayshrineString) then
  11.         hideInteraction() -- Using this would hide the target interaction, but, is not needed to disable it.
  12.         return true -- if wanting it always disabled. Could use addon settings or timers to set this for a set time
  13.     end
  14. end)

I have an addon that uses this, the current version and have an update of it for when the lib is updated. It disables select interactions while the player is moving and for a set time from when they stop. All is set in addon settings.
Example:
"Talk" has a slider for cooldown until useable.
And, it dynamically generates actions, settings, and registerOnTryHandlingInteraction per action.
IsJusta Disable Actions While Moving

I'm also looking at making it add additional info to the parameters so that GetGameCameraInteractableActionInfo() is not called so many times from addons.

Last edited by IsJustaGhost : 06/17/23 at 05:18 PM.
  Reply With Quote