Array , Cant Remove an Index from Array with CE

Hey, i have an Array, With Actors.

So at my Widget in the Grid Panel when i Click on it, The Widgets gets Removed, than it gets the Index NR of the Widget(In the array) than it Should Cast to my Hero with an Event, that it Should delete the Actor with the Index NR

But it seems It doesnt Work, Any Ideas?
On the Print string at the End, it Gives the Correct, Index Output on the Log, but why it doesnt Work?
The Strange things it, My Custom Event “Delete Waypoint from Array” gives Correct Integer on Debug, but
on “Get” array and Remove index "nodes the Current Value always “0”
Any Ideas?

I’m curious what your array contents are before and after the Remove. Destroying an actor sets references to it to None, which means your array should end up as “None” at that index. If that’s what’s getting removed, you may be getting unexpected results because of it. (It would help if whatever Get and Remove are attached to was in the screenshot).

Sometimes when I’m debugging, the values for outputs on nodes which aren’t directly connected to the node with the breakpoint I get values I’m not expecting. I’m not sure exactly when this happens, but I think it has to do with them being out of scope. Try setting your breakpoint one a node hooked directly to the value you’re reading, that might give you more context.

Thanks for ya answer

The Problem was set Array Elm i had +1 integer, everytime, so the Index was not Synct with the Widget … so thats why it just Erased it Sometimes,and sometimes not.