Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

AI Crash



I was wondering if anyone is able to help me.

So I have had an issue for months now with Enemies crashing my game. Regardless of the models/animations I use. Regardless of the scripts or code I use (I have tried the Default, The HUD elements ai script and about 4 variations I have made myself). Simply having enemies in my project causes crashes. I have tried running my game without enemies and it runs perfectly. But even if I set them to run away instead of attacking, simply having enemy characters causes the game to crash.

I would really love and appreciate some help fixing this because its an issue that makes my game unplayable and the only major bug I have left to fix.

Link to post

11 answers to this question

Recommended Posts

  • 0

I don't know your specifics but recently I had a crash when I loaded a different model in my game.  The issue ended up being that I was trying to manipulate an attachment via code that the new model didn't have.  In other words, make sure you're not trying to access a model (like a gun) that your new models may not have.  Just a thought; could be anything though.

Link to post
  • 0

I don't think its a bone reference thing. Because it even does it while using default crawler prefab.And I tried a very basic script that I wrote where all that was in if was; if player is inside this distance run to random position.

I tried debug mode but its unusable my game won't even run in debug. It hits 2fps and stays there in debug mode. Which is weird because I have a pretty decent pc and my gpu is the nvidia 1080.

I don't think nil checks will help because I have already tried bare bones code that simply says re-position if player is in range. Using this method I was able to get the crashes from every minute or so up to around the 5-10 minute mark. Also something to point out using this method the game would run longer with fewer crashes but it would also experience a different kind of crash that wasn't so random. Where my game just kept getting slower and slower as more spawned in and then it crashes. 

I noticed there was a collectgarbage command. Is this something that only works in debug? What is the correct way to use this? I was thinking it might help if I use it in the update world function.

Link to post
  • 0

There is literally nothing specific going on. I have been trying for months to narrow this down. It happens at random and they are doing different things. One that does happen a lot. Enemies will run in place because of the broken navigation. Then after a while they will glitch out collide with the terrain and then the game will crash. But that is only one of many causes. It honestly feels like simply having enemies in my project causes the crash.

Link to post
  • 0

I think it might be the navigation being broken. A blank small project works fine. But I remember reading in the forums there was a bug where if you changed the world size or terrain size (something like that) it breaks the navigation. And I did this in my game because I was making a massive open world game. The navigation does appear to be broken because enemies often don't know where to run or move to (and glitch out). And I have noticed these crashes are happening when they glitch out. I have also noticed having more then 1 or two enemies causes the scene to become overloaded very quickly. But this could be because the Leadwerks is 32 bit and isn't able to access more ram.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Facebook Twitter Youtube Github Steam
  • Create New...