Hi - you can’t rely on the ordering, you have to make it.
If the target point actor is a BP, you can put an int in it, if they’re just actors, you can set a tag with an int. Then grab the array and sort it by the int.
That way, you always know which order they’re coming in…
Can you elaborate how I can achieve this via direct communication? I don’t quite understand.
Images will be more than welcome!
More specifically - If I make variable of type Target Point array - it won’t let me set the reference actors in the widget BP.
I’m having a difficult time working around my problem, and here it is:
I have a Widget BP that stores Target Point actors on Initialize . I then get their transform and set the character location to each of the target points respectively upon button click.
The problem is - It works perfectly in PIE while in build/standalone game it just breaks and teleports to the wrong locations. When I print the array element names I can see that the order changes in Standalone.
I do presume the array order based on the first actor created and then duplicated around the level. So the second actor in the array is the second Target Point duplicate, etc.
I’ve come to learn that there’s a different execution order in Build and PIE, but not sure if it’s related to me issue.
I tried storing the target points in play controller, game instance, game mode, nothing helps.
I’d like to learn of better, smarter ways of doing this, or just any fix.
Thanks!
I just use Target Point Actors ideally. but I created a BP of type Target Point with int variable “ID” - following your first reply. Still can’t get it right