Why won't my bot move?

If you are using the 4.7 preview this is currently a know issue: https://answers.unrealengine.com/questions/155785/47-preview-simplemove-failes-on-topdown-template-a.html

If not, could you post a log file so have a bit more info?

I am attempting to spawn a unit and then send that unit to a target. I have included a NavMesh and made sure that my unit can walk around the entire area up and around the target. However, when I run, my guy simply spawns and does not move. To clarify I am using the free ASP-character provided on the market.

I read somewhere that I should make sure the controller is ran by AI-Controller within the defaults and I made sure that was selected.

Any ideas?
Thanks!

The only line that seems to be interesting is,

LogNavigation:Warning: UNavigationSystem::SimpleMoveToLocation called for Controller:None controlling Pawn:NULL (if any of these is None then there’s your problem

Regarding the first picture I provided I assume it’s that empty controller slot.

However, considering I don’t actually have the unit as a direct selection, only as something spawned with the SpawnActor. I have no idea what should connected to the controller slot.

I’ve been trying, but the only way I can reference the asp_character is by casting it right? Because I’m spawning the character so it can’t be referenced directly. However, every time I try to cast anything into the controller port it still won’t work.

Haha, it appears I am in way over my head.

I think I’m getting myself confused on the actual process of spawning the first controller without the unit being on the level by me placing it.

Holy cow I did some dabbling here and there and got it to work based off your answer! Thank you very much!

Is there anyway I can manipulate this to produce multiple units from the 1 location? Just making sure I’m not doing all of this for nothing!

Try to add the controller of the Character by using GetController(). Any controller must have a Pawn linked to it, the engine will do that automatically if you specify you character and AI controller in the game mode you are using or in the WorldSettings override within your level.

Ah ok I see, you are not possessing the character with a controller! Ok lets see, the way to do that is to spawn first the controller, if it where successful spawn the character, if it where successful posses the new character using the newly spawned controller. There are methods from the pawn or the controller to both posses and unposses a pawn.

If the spawning fails (blocking collision, telefrag etc) make sure to delete the actors that you left over, if not they will be there until the next map change.

Nice :smiley: I have all the spawning login placed in a Blueprint Library, that will make your life a bit lighter :smiley:

I’m sorry I don’t quite follow what you meant by that.

Wow, that is so neat. I am loving this program the more I use it!

Thanks again for all of your wonderful help.

Crating a Bluprint Library you can add function which you can use elsewhere. Just create a BP library and add a ‘Spawn’ function that does all the heavy lifting of spawning a controller, spawning and possessing the pawn.

np :smiley: make sure to accept to answer to help others with the same issue ^^

Have a nice day!

Moss, I’m not sure if you can still see this but after getting everything to actually work I noticed the instances you spoke of that would require me to remove the actors. I put my branch initially after it attempted to actually spawn the character. (so it would spawn the controller, then the character then check)

However, I don’t think it’s working right because I’m using a while loop that has a delay put into the macro. Which works 100% fine at 1 second delay with the branch condition box [X] <— checked, however if I leave it unchecked then it deletes actors even though it normally has ample time.

For some reason it just likes to run false, usually twice after the first actor and I don’t know why. (I’m running a max of 3 at the moment)

Could it be that you are spawning the character in the same spot? You should get a message in the log indicating why it was not able to spawn. Also verify that you are not saving a reference to the controller into a variable so you could accidentally delete the wrong controller.

I don’t think it could be a variable because I never made one for it. Shouldn’t be a big deal overall though, because I plan on having at least 3 spawn points with a fair delay. I’ll let you know.

In your bot/Ai charater settings you need two things. Of course your Aicontroller, but for undertaking any action with this controller, you must check in Class Defaults: Pawn > Auto Posses AI change default - placed in world to spawned. Or maybe last one - both.

I think you can use other solution, in Ai Controller settings it can be attached to owner, but in my case it solved problem.