Conditional To Find Actor In Array?
I have an Inventory Array storing Items as (Actors). Not Class_Actors.
I am trying to run a Conditional == (Object) to Test to see if its the Blueprint_Actor_Item_Child I previously stored in the array. For some reason, even though I can see my Blueprint Item being stored in the array. I cannot seem to use a conditional to match that item. Attach is screenshot of the test I am running.
I am wondering if when I add my item to the array it is given a different type of class or something that it cannot be matched with the original blueprint actor anymore. Because my Inventory Array for items is an array of actors. Not classes.
Any help would be appreciated.
Basically trying to find a way to see if the item(actor) in the array is equal to my selected item(actor).
asked Jul 11 '14 at 03:30 AM in Blueprint Scripting
You will need to cast to the Actor before comparing , I am thinking. When you add an object as as "Actor" into the array, it will only return as a typr 'Actor'. You must manually cast it to the original Class.
So before feeding it to the '==' node, cast it to the type of object you are comparing against.
answered Jul 11 '14 at 03:57 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here