Fork me on GitHub

Scripting

Scripting is provided using the Lua programming language.

You can read about Lua on their website, and if you've never worked with Lua before, you might want to take a read about the language itself. There are many good resources - one of the best is Programming in Lua.

There are two Lua contexts in use in Chaotic Rage. The both have access to differnet aspects of the game engine.

The AI scripting is for controlling non-player characters. The characters can investigate aspects of the game world and use that to determine the direction to head and when to attack.

The game also features Game type scripting which controls the game mechanics, such as player and npc spawning, scoring, ammo drops, etc.

Both contexts make use of "binding" for the handling of events. This is similar to how events are handled in languages like JavaScript. Multiple handlers can be bound to any given event.