Cafu Engine
Scripting Documentation

Overview

Welcome to the Cafu Engine Scripting Documentation.

You can use scripts to program the behaviour of things in the Cafu universe.

This reference documentation describes the classes and functions that can occur and be used in Cafu game scripts, especially:

  • Map scripts – Scripts that program and control the entities that live within a game world (such as human players, monsters, weapons, doors, lifts, ...).
  • GUI scripts – Scripts that control the user interaction with 2D GUIs (e.g. the programs main menu) and 3D GUIs (e.g. the teleporter controls, unlock door keypads, etc.).

Other sub-systems in Cafu are script-controlled as well, such as the in-game console, the program configuration file, the render materials and sound shaders, etc. For these types of script, please refer to the documentation at http://www.cafu.de/wiki/

How do I get started?

For getting started with scripting, the "learning-by-doing" approach often works very well, because it's fast and fun: Start by studying and modifing the example scripts that ship with Cafu (see links below), or take them as starting points for your own work. Experimenting with working scripts will make it easy for you to understand the underlying key ideas and concepts. Then come back here and read the documentation as required. You may also want to have a look at the Lua documentation and/or start asking questions at the Cafu mailing list or forum.

Additional Resources of Information