User Tools

Site Tools


functions

Functions **Under Construction**

Back to Tabs List.

Functions are an Earwigo-only feature, not available in the Groundspeak Builder. A function is a sequence of one or more lines of code which you can “call” at any time, from an event handler (such as “when the cartridge is started” or “when the player enters a zone”), or from another function.

In the Groundspeak Builder, you can write functions in the Lua programming language, but they have to go in the Author Script section, and you can't use any of the Builder tools to manage the statements of the function; for example, to use a zone or a character, you have to refer to its “internal” name. Earwigo functions allow you to write “reusable” code without knowing too many of the details of Lua, and with an easy way to refer to the cartridge's objects.

(Note1: picture showing the tab for Functions should go here)

(Note 2: this page has no content, just the formating)

Dialogs Tab in the Builder

List

(Brief explanation of the list tab, including how to add functions)

(challenge: write an example of a more advanced function which uses the “parameter” possibility, that can be understood by the type of person who doesn't know how to write code in Lua, and will not generate lots of support calls from non-programmers! Nick 2010-07-26)

Properties

(Explanation of properties tab, including some commonly used functions)

functions.txt · Last modified: 2012/07/09 23:54 (external edit)