Book Image

CryENGINE 3 Cookbook

By : Dan Tracy, Sean P Tracy (USD)
Book Image

CryENGINE 3 Cookbook

By: Dan Tracy, Sean P Tracy (USD)

Overview of this book

With every successive console generation, the cost, time, and complexity of developing games has grown. Meet CryENGINE3, a middleware engine that is the perfect fit for most developers allowing users to exceed current generation quality standards while using less people and time than ever thought possible.The CryENGINE3 CookBook is packed full of recipes for junior and senior developers alike. It covers everything from creating photo realistic architectural visualizations to implementing advanced physics such as ragdoll and tornado effects. Topics covered include the sandbox, level layout, environment creation, AI, character creation, creating vehicles, and game logic. Every recipe is designed to add AAA quality to your games. The CryENGINE3 SDK has many tools immediately available to developers of all disciplines. For designers the book has recipes for building up your own levels and populating your levels with intelligent AI and photo realistic assets. For artists we have recipes for practical workflow tools and techniques used when working with the advanced CryENGINE shaders and materials. For animators we have recipes that will bring your creations to life using skinned characters and advanced animation systems like locomotion groups. Finally for programmers we have recipes that show how to employ the core mechanics behind entities such as vehicles and weapons while also utilizing the strengths of the physics engine to create a unique and exciting game.
Table of Contents (18 chapters)
CryENGINE 3 Cookbook
Credits
About the Authors
www.PacktPub.com
Preface
Index

Rewarding the player for reaching a kill goal


This recipe is a slight extension to the previous one. There are plenty of ways that the designers may want to reward the player in their title, but in this recipe, we will look at getting the player to kill five Grunts using just melee and then reward them by giving them a SCAR assault rifle.

Getting ready

  • You should have completed the Creating a kill counter recipe

  • Then open My_Level.cry within the Sandbox

How to do it...

  1. Open the KillCounter AreaTrigger Flow Graph and add in the following flow nodes:

    • Game:LocalPlayer

    • Math:Equal

    • Inventory:AddItem

  2. Set Math:Equal B to 5.

  3. Link the Flow Graph together as follows:

    • Math:Counter count out to Math:Equal A in

    • Math:Equal true out to Inventory:AddItem add in

    • Game:LocalPlayer entityId out to Inventory:AddItem Choose Entity in

  4. The end resulting Flow Graph should look like the following:

Note

The Kill Counter and Kill Goal colored boxes around the nodes are comment boxes. To add a comment box, right-click in...