Download

How to chose Default Value for Variable by Blueprint

I have actor that has 3 Variables whose type is Actor. As for now when I want to define the default value of those Variables I must make them public and manually chose the actors from the visible Map( you know, click the eye on Variable and chose the thing in Details of actor).What I want basicly to do is when this Actor spawns in level it will take the nearest actor and make it for one of The Variable (the one I chose of course) it’s default Value. I don’t need to know how to make the nearest thing, but if it’s possible to make him chose the nearest Actor from the blueprint level or at all.

Here is some visualization:

I can explein further if you need .
( sorry if I write messy )

You can add the distances to an array, and then after looping, get the lowest value:

It worked . Big thanks to you . This will open other possibilities for me.