Book Image

Mastering CryENGINE

By : Michelle Martin
Book Image

Mastering CryENGINE

By: Michelle Martin

Overview of this book

Table of Contents (17 chapters)
Mastering CryENGINE
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Testing the SmartObject rule


Now that all the setup is done, let's test our work. Jump into the game and shoot one of the barrels. Once the barrel is broken, its state will change and you will see our AI walking towards the barrel to repair it.

You can go ahead now and add more DestroyableObjects and AI characters to your level or modify the AIAction further. As long as the SmartObject classes are set up properly, you can have dozens of AI repairing dozens of machines at the same time.

Troubleshooting

Since creating new SmartObject rules is a rather complex process, a few mistakes can happen along the way. The following is a short troubleshooting list, just in case the SmartObject example does not work right away:

  • The AI character does not move: Check if the AI navigation has been set up properly. An AI not moving is most likely always caused by an incorrect navigation setup. Also check if the AI character is close enough to the things he is supposed to repair. In the properties of a rule,...