Jump to content

SoldierAI


Angelwolf
 Share

Recommended Posts

I'm having a play about with the SoldierAI script and trying to get it working with a model to fire a projectile.

Model has an animation called 'Fire'

Projectile Prefab is 'tracer.pfb'

I've added a pivot named 'muzzle' to the model.

When testing, as soon as the model shoots, the game crashes out with a 'Program has stopped responding' error.

I've also tried renaming a limb in the model (via the scene) to muzzle and deleting the pivot, but the issue remains. What am I missing?

  • Upvote 1
Link to comment
Share on other sites

I found the solution to this.

It was crashing because there is no default check in the SoldierAI script to ensure that there is a sound attached for when the model fires. Adding a sound or commenting the line that calls the sound prevents this error.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   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.

 Share

×
×
  • Create New...