From ffe3e03947d4421c516f7f3e5333f41727078303 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Sun, 6 Mar 2022 04:22:17 -0500 Subject: [PATCH] add PlayersActionPressed --- eid_api.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eid_api.lua b/eid_api.lua index e61c055b..8397a190 100644 --- a/eid_api.lua +++ b/eid_api.lua @@ -1411,9 +1411,19 @@ function EID:removeIgnoredEntity(entityType, entityVariant, entitySubType) end end +-- Returns if this is a frame we should refresh our descriptions function EID:RefreshThisFrame() if EID.GameRenderCount % (60 / EID.Config["RefreshRate"]) == 0 then return true end return false end + +-- Returns true if any player is pressing the given button (you can also specify any of the input functions) +function EID:PlayersActionPressed(button, inputFunc) + inputFunc = inputFunc or Input.IsActionPressed + for k,_ in pairs(EID.controllerIndexes) do + if inputFunc(button, k) then return true end + end + return false +end