Documentation

Project Globals and API - Open Dev Kit Documentation

Open Dev Kit Documentation :: Project Globals and API

In Project Globals and API you can view and manage all of your project's lower level controls such as variables, classes, functions and other data structures accessible across your entire project. The API Editor also enables you to add, edit, and remove API elements, giving you the flexibility to extend or customize your project's functionality as needed.

Creating Variables/Functions

Variables are essential components for storing data that can then be referenced and manipulated via scripting. To create one, fill out a name for it in the "New API Node" textbox, and then click the "Create Variable" button below. You can then set various properties for that variable as well as its data type, for determining what kind of data it will be able to hold.

Functions are blocks of code designed to perform specific tasks by passing inputs into them and receiving outputs. To create a function, fill out a name for it in the "New API Node" textbox, and then click the "Create Function" button below. You can then set various properties for that function as well as its return data type, for determining what kind of data it will be returning, if any at all. To create arguments for that function make sure it is selected, fill out a name for it in the "New API Node" textbox and then click "Create Function Parameter" on the toolbar above the API list. Arguments can be used to feed data into the function according to the data type that's been specified to them, such as a pointer to an object, text, number, etc.. Click "Edit Function Script" to create a script that the function can execute.

Setting up Classes

Classes serve as blueprints for creating objects that mimic real-world entities. They can consist of all types of data such as properties and functions and can operate on that data. To create a class, fill out a name for it in the "New API Node" textbox, and then click the "Create Class" button below. You can then set a base type for that class if necessary. To add properties to that class, make sure it is selected first, and then go through the process of creating a new API node as it was described above. It is also possible to paste copied nodes in it.

Setting up Events

Events are like triggers that signal when a script should be executed. They are typically added to classes and are set up in the individual instances, where you can then edit these scripts when editing an API node of that instance. Then in scripting you can use the "Simulate" events to make those scripts run.

Understanding Enumerations, Flags & Constants

An enum is a list of unchangeable values (Constants) and are typically used for drop-down menus. Each constant of the list has an integer value (0, 1, 2, 3, etc...). To create an enum, fill out a name for it in the "New API Node" textbox, and then click the "Create Enumeration" button below. To add constants to that enum, make sure it is selected first, and then click the "Create Enumeration/Flag Constant" button below. It is also possible to paste copied constants in it.

Flags are very similar to enumerations in the sense that they consist of unchangeable values or constants, except they're used for checkboxes where multiple options can be picked. They are setup the same as an enum where you create a flag, then add constants to it. It is also possible to paste copied constants in it.

Toolbar

Move API Node Up
Moves API node one place above on the list
Move API Node Down
Moves API node one place below on the list

Nodes

List of all API nodes for the project

API Node:

Displays the type of the API node

Edit Default Object

Edits the default object the API node creates

Pop-up Context Menu

Cut
Copies the API node in the clipboard while also removing it from the list
Copy
Copies the API node in the clipboard
Paste
Places the API node stored in the clipboard
Move Up
Moves API node one place above on the list
Move Down
Moves the API node one place below on the list
Delete
Deletes the API node

If you think anything is missing, please feel free to: submit documentation feedback on this page