# How to compare two arrays of the same type 

**URL:** <https://forums.unrealengine.com/t/how-to-compare-two-arrays-of-the-same-type/2677542>\
**Category:** Programming & Scripting\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [November 22, 2025, 2:19pm UTC](https://forums.unrealengine.com/t/how-to-compare-two-arrays-of-the-same-type/2677542 "2025-11-22T14:19:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![damageINC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@damageINC](https://forums.unrealengine.com/u/damageINC)\
**Post date:** [November 22, 2025, 2:19pm UTC](https://forums.unrealengine.com/t/how-to-compare-two-arrays-of-the-same-type/2677542/1 "2025-11-22T14:19:27Z")

</div>

I’m god awful at blueprinting but I basically have an array of type struct, and within that struct is a bool that I want to track the state of. I believe somewhere else on this forum someone mentioned creating a copy of the the array as a sort of “previous state snapshot”. But I have no idea how to compare one array with a copy of itself to see if that bool has changed for each index of the array. Anyone have any idea how I would handle this cleanly?

---

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [November 22, 2025, 4:13pm UTC](https://forums.unrealengine.com/t/how-to-compare-two-arrays-of-the-same-type/2677542/2 "2025-11-22T16:13:20Z")

</div>

So long as the types inside them are comparable this setup should work

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/6/a56668024e49effb0aabb9c13f095b7116097751.png)

---

<div class="post-metadata">

**Author:** ![damageINC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@damageINC](https://forums.unrealengine.com/u/damageINC)\
**Post date:** [November 22, 2025, 6:42pm UTC](https://forums.unrealengine.com/t/how-to-compare-two-arrays-of-the-same-type/2677542/3 "2025-11-22T18:42:28Z")

</div>

Apologies but I wonder if you could outline an analogue in BP? I don’t know how to implement C++ changes. Also thank you for the response. And coming out of it…….would I need to store it in another separate array? The end goal of the exercise is get a snapshot of the state of a container that holds weapons or items……..if slots are occupied and if so which ones (which the logic already does) but there’s nothing to do a comparison once it detects the change. Ultimately, I want to have a series of bool conditions driven off of the possible states. These arrays are super small, 2 or 3 indices each.

---

<div class="post-metadata">

**Author:** ![damageINC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@damageINC](https://forums.unrealengine.com/u/damageINC)\
**Post date:** [November 22, 2025, 7:29pm UTC](https://forums.unrealengine.com/t/how-to-compare-two-arrays-of-the-same-type/2677542/4 "2025-11-22T19:29:35Z")

</div>

So here is a snip it of blueprint that I made to try and convey meaning visually. I realize this wouldn’t work but it’s what I want to achieve. But this is the comparison I want to be able to quantify or flip conditions on if this makes sense. I also need to be able to store the index if something was removed. Sorry if this is super convoluted.

 ![CheckLogic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/b/29b8cbb19a5e888bb1d963a2fde956207966a4bd.jpeg)

---

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [November 23, 2025, 3:18am UTC](https://forums.unrealengine.com/t/how-to-compare-two-arrays-of-the-same-type/2677542/5 "2025-11-23T03:18:06Z")

</div>

There seems to be some confusion, You have marked this post as FN/UEFN I would recommend changing the post or re-posting but with Unreal Engine Tags, UEFN(unreal editor for fortnite) does not have blueprints or C++ it utilizes the verse programming language.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/1/21117108e9ee4321eae216ba0700c80b0460b1b1.png)

---

<div class="post-metadata">

**Author:** ![damageINC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@damageINC](https://forums.unrealengine.com/u/damageINC)\
**Post date:** [November 23, 2025, 9:40am UTC](https://forums.unrealengine.com/t/how-to-compare-two-arrays-of-the-same-type/2677542/6 "2025-11-23T09:40:38Z")

</div>

Ah sorry there. Wrong Forum.
