(39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

IsValidIndex fix:



    DECLARE_FUNCTION(execArray_IsValidIndex)
    {
        Stack.MostRecentProperty = nullptr;
        Stack.StepCompiledIn<UArrayProperty>(NULL);
        void* ArrayAddr = Stack.MostRecentPropertyAddress;
        UArrayProperty* ArrayProperty = Cast<UArrayProperty>(Stack.MostRecentProperty);
        if (!ArrayProperty)
        {
            Stack.bArrayContextFailed = true;
            return;
        }
        P_GET_PROPERTY(UIntProperty, Index);
        P_FINISH;

        bool WasValid = GenericArray_IsValidIndex(ArrayAddr, ArrayProperty, Index);
        *(bool*)RESULT_PARAM = WasValid;
    }




bool UVictoryBPFunctionLibrary::GenericArray_IsValidIndex(void* TargetArray, const UArrayProperty* ArrayProp, int32 Index)
{
    bool bResult = false;

    if (TargetArray)
    {
        FScriptArrayHelper ArrayHelper(ArrayProp, TargetArray);
        bResult = ArrayHelper.IsValidIndex(Index);
    }

    return bResult;
}