No it stops at 1 with both the interger way and add array node. add unique stays on 0
It for whatever reason does not count higher than 1 for both of your methods.
Ok, so the spawn has to be happening elsewhere, somehow?..
That code I linked was the only spot it should spawn. But I will double check my magic setup and also the AI itself. Give me 5 Ill test with a new unique AI
For the testing purpose, try and create 2 variables of the spawned actor type, and set their values to the newly spawned AIs.
You can use a FlipFlop node to select which variable is set.
Check if a variable IsValid after setting it.
Another thing: create an Int array and try using AddUnique on it, just to make sure the AddUnique node works as intended and that’s not some kind of a one in a million bug with the engine.
I know I’m roughly two years late, but I’m having this exact same problem now.
I want to spawn a cube whenever I press “H” and then store every spawned cube in an array, but I’m having the same issue.
Every time that a new cube spawns, my array removes the previous actor at index [0] from the array and replaces the newly spawned cube.
I used both Add and AddUnique nodes but none of them worked. I think this should be an engine bug or something, as it looks super weird.
Create a new thread, post offending script.