Hey derm,
Like vipeout said, you should run the selection through the controller. What I do for my selection process (usually with more than 1 type of actor I can select) I use an event dispatcher. In my main custom Player Controller, I add an event dispatcher, we’ll call it ‘SelectEvent’, and add an ‘Actor’ in it’s input.
Then, in my AI controller (or my Building BP or whatever else I want to be able to select) I get a reference to the main custom Player Controller in the Begin Play, and store this in a variable for later use. While in Begin Play, after I cast my Player Controller and save it, I Bind the ‘SelectEvent’ from my Player Controller. Then, create a custom event in the graph (of your desired selectable object) and we’ll call it ‘WasSelected’ with an input type of ‘Actor’, and use this custom function as the delegate to the Bind SelectEvent.
From there, in my ‘WasSelected’ event, I immediately pull off the ‘Actor’ pin, do == and compare it to “Self”. Branch off that conditional check, and if it’s True, then that instance of the object was selected and I’ll run my code according, whether that’s setting Blackboard Keys for my AI to select a Task, setting variables within the selected item, popping up a HUD or whatever it is I am trying to accomplish. If the == comes up False, I do nothing because it wasn’t the one selected.
Event Dispatchers are relatively expensive; however, if you have many types of objects you want to select in the world, it saves a headache over using Interfaces or other round-about ways of doing it so, to me, it’s worth the added cost.
To answer your other question, I would suggest this tutorial series: https://www.youtube.com/playlist?list=PLDnygpcOYwFW2XtNyiandrLDG__OAZs7Q
There’s currently 35 videos in the RTS/City Building type tutorial series and generally 2 new videos are added each week. It’s building a game from scratch with no steps done between videos - everything is done on camera. Several of the last videos were done doing AI tasks (construction process) doing exactly what you are asking for - A building is placed in the world and the NPC automatically knows where to go and what to do with no interaction from the player. The entire series is worth checking out, each video builds off of the last video, but conceptually, you can pick it up from anywhere and learn something new from it!