Board / Goose game : save all cases positions : problem with GET ALL ACTORS OF CLASS

Hi all ^^

For my goose game project, I had idea to “map” or “index” all cases in my event BeginPlay.
So I used a Get All Actors with the class that I use for my cases, and with that, I save their locations and their types (bonus / malus / …).

The thing is, after weird moves of my pawns, I saw the node GET ALL ACTORS OF CLASS take all my cases randomly (or not?). So It doesn’t work because I update the pawn positions with the roll dice and the case is supposed to be on.

Have you tips to sort my cases with display name ? I can’t sort by distance because it will be not a linear board. :confused:

Thanks in advance because I’m a bit lost ^^

Ok I solved my problem with a parse technique

I take my actor display name, I use a “Parse into array” with the word “case” because all my actors’ names are like “case0” “case1” … and I join string array in order to have a string value that can I use as index for a new array (a structure in my case).

Solution :

I switched all my “get display” nodes to “get Object” nodes instead because if you hover over the display node it gives you a warning that its replaced anyways so I figured why use it at all. Also beware in the future that using arrays of structures can be troublesome when accessing and assigning values to the struc variables. I only mentioned it because if you develop long enough with the engine you will see what I’m talking about.

see this answerhub for more info…