Array Contains Item plug-in order bug

Array/contains item node allows you to plug in an object reference in first, then an actor class array second, and that works perfectly fine. However, you can’t do it the other way around, and when you restart the editor, the contains item node that worked prefectly fine before will issue a warning. Replugging it fixes it, but having to replug every node like that upon startup gets tiring.

Hi Technotium,

I attempted to reproduce your issue but I couldn’t get the same results. Could you recreate the error in a small test project and upload it here?

Here you go, a recreation is inside the FirstPersonCharacter blueprint.

Hello Technotium,

I was able to reproduce this issue on our end in the project that you provided. However, I then tried to recreate this issue in a clean project and was unable to do so. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Did you use any assets from your original project when creating the test bed that was given?
  2. If so, could you try recreating this issue in a completely clean project and then provide a detailed set of steps to reproduce this issue on our end?
  3. Was the project that is having the issue upgraded from an older version of the engine?

Hmm, that’s weird.

The test bed was just a First Person Shooter Template where I made two additional blueprints so that I could add one to the Actor Class array, there shouldn’t be any other assets than that.

Both projects I have encountered the issue in have been made in 4.8.

Hello Technotium,

There may be a small difference in the steps take to try and reproduce this issue myself. Could you answer question number two and provide a detailed set of steps to reproduce this issue? This will insure that we are seeing the same results.

Certainly.

Let’s say I want do control what can and can not be destroyed by a player with some sort of disintegration device. (I know there are more optimal ways of doing this, but just as an example.)

Step 1: Make an Actor Class Array Variable, and put the actors you want to destroy in that array.

Step 2: Have the player make anything that can hit objects and give an Out Hit pin. (I’ve only used linetraces by the visibility channel, but I would think any Out Hit could recreate it.)

Step 3: Split the Out Hit pin and get the Out Hit Hit Actor, drag a getclass function out of the Hit Actor pin.

Step 4: Make an Array Contains node, plug the getclass Object Class pin into the lower pin of the Contains node, then plug your Actor Class Array Variable into the Array pin of the Contains node.

Step 5: Use the boolean output pin of the Contains node to drive a branch where true leads to destroying the shot actor, and false does nothing.

Step 6: Test it, it should work fine. Restart the project. Test it again without opening the blueprint it is in, it should still work fine. Open the blueprint it is, you should get warnings.

Step 7: Simply replug the Contains node, it should now work fine until the next time you restart.

Hello Technotium,

I tried following the steps that you have provided above and I was still unable to reproduce this issue in a clean project. Could you try refreshing your nodes? Open the blueprint > File > Refresh all nodes and let me know if this makes a difference.

Refreshing the nodes when they are giving warnings does nothing, doing it when they are functioning gives the warnings.

Hello Technotium,

I was able to reproduce this issue on our end. I have written up a report () and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your information and time.

Make it a great day