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

Extending the state machine


As mentioned earlier, CryMannequin can only choose which Fragment to start within a Fragment ID. The game logic decides which Fragment ID to start. This is done in a state machine inside the game code.

Not all games need to extend this state machine, as it already offers states for a large range of different actions such as locomoting, jumping and sliding, and even zip lining and ledge grabbing. If your game needs no new states, you will only need to modify or exchange the Fragments inside the existing Fragment IDs.

While there are multiple tutorials that cover the setup of CryMannequin and the creation of new Fragment IDs, Tags, and Fragments, there is very little written on the state machine that represents the high-level selection logic. This section will explain how to extend the state machine and add (and trigger) a new state that will start a newly added CryMannequin Fragment ID.

Note

At the time of this writing, the only way to add new states to the state...