x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Possess the character from the beginning when simulating?

I have some levels with multiple different AI setups, where one AI is not working. Upon trying to debug, I noticed that no AI works in simulation mode, the BTs and services and such won't display any flow paths, openng the debug object dropdown in any BT yields "No matching actors found" and several errors are reported.

After having a closer look at these problems, I figured out the following: Each of the pawns needs to reference some stuff from the player character upon spawn, via getPlayerCharacter(0) (the game is singleplayer only so that's no issue). However, as simulation mode starts out ejected by default, getPlayerCharacter(0) yields None, thus crashing all of my AI-controlled pawns.

Getting simulation mode to auto possess a player character would obviously let me debug my AI, so the important part now is, how do I achieve that?

Product Version: UE 4.15
Tags:
more ▼

asked Jan 24 '18 at 11:56 AM in Using UE4

avatar image

EHX-X
3 3 2 5

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

I figured out a workaround for the problem: When you switch levels while playing (no matter if normal play or simulation), the possess/eject option gets carried over. My menu doesn't yet depend on a player character being present from the start, so loading that, possessing, and making my way to the level in question does the trick. Quite tedious once the cumulative size of the levels grows beyond a certain point, but better than nothing.

For those who don't have the patience to go through all your levels: You can create an additional (potentially debug-only) level select map, from where you can load all your levels. Make sure it doesn't depend on your character being possessed right away. Then load that, possess, and load the level you want to debug from there.

more ▼

answered Jan 25 '18 at 05:50 PM

avatar image

EHX-X
3 3 2 5

(comments are locked)
10|2000 characters needed characters left

The only work around I can see is to start in play mode than pres Shift + F1 and click the eject button shown below:

alt text

This will ensure that everything spawns correctly and you can get the same controls as if you were in simulation mode

It appears that no character gets spawned until you either possess the controller or start in play mode.

eject.png (24.4 kB)
more ▼

answered Jan 24 '18 at 12:52 PM

avatar image

Miroac
713 19 25 108

avatar image EHX-X Jan 25 '18 at 05:41 PM

That's not quite the point of it. The reason why I need simulation mode is the flow visualization and watching stuff. AFAIK that's not possible in normal play mode. However, I couldn't get simulation mode to start with player possessed. By now I figured out at least some way to start levels with player possessed. Thanks though.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question