View Single Post
06/24/18, 02:32 PM   #7
ArtOfShred
 
ArtOfShred's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 103
You could just do:

Code:
function RetryFunction()
if not IsCollectibleActive(#) then
     UseCollectible(#)
else
     EVENT_MANAGER:UnregisterForUpdate("Refire")
end

function DoThat****MyDude()
     UseCollectible(#)
     EVENT_MANAGER:RegisterForUpdate("Refire", RetryFunction, 100)
end
Function will just keep trying every 100 ms until it gets used. Might want to put a counter variable on it too so it times out after a few seconds if not.

Last edited by ArtOfShred : 06/24/18 at 02:41 PM.
  Reply With Quote