Dungeon Souls Editor Quick Onboarding Modules Items Sprites Functions Steam Workshop Contact

Function Documentation

A function represents a block of code that can be executed in Dungeon Souls. When a function is declared, regardless of the location of its definition, is it available to all definitions in the module, acting like a global function. The function definition is a special case of definition, since it can be defined inside of any other definition.

Similar to what happens with sprites, functions can have multiple inputs and the order of the declaration of these inputs is important. However, functions can only have either one or zero outputs.

Keywords

A function definition contains does not contain Game Variables. However, it does contain the following reserved keywords:

Name Description Required
functionInput A variable declared as a function input. Can be declared multiple times. False
functionOutput A variable declared as a function output. Can be declared once. False

Location and Extension

Do to its nature, the function does not have a specific file location and can be located anywhere.

Example

Here follows an example of the definition of a function:

...
define function sum
{

functionInput a;
functionInput b;
functionOutput result;
result=a+b;

}