Game Takes a long time to stop playing

Hello,
The issue i am having is whenever i hit stop after playing my game it takes a LONG time to actually close it out. it freezes the entire editor up for a couple minutes sometimes. this isn’t game ruining but it would definitely help with the game flow. I do have a lot of NPC’s that walk around and look for the player so im thinking that the engine trying to log there movements but i’m not sure how i would turn that off or if that’s the real problem.

So the only warning in my output log is the flowing
LogArray:Warning: Attempted to get an item from array LastSensedStimuli out of bounds [0/0]!

It posted around 100 times a second, do you know how i would get rid of this?

Sometimes what happens is if the engine hit an ensure() call it would not crash, but freeze for a while and spit out a huge error in the output log. Can you check if this is the case? Clear the output log, hit stop and see what prints out. If there’a gigantic stack trace error then that’s your problem.

That is related to AI Perception. You’re trying to access the sensed stimuli somewhere but aren’t checking if any exist in the first place.

1 Like