Support Home Scripting Form Fields Reference Guide

Form Fields Reference Guide

  • Overview
  • General Classes
  • Array
  • Asset
  • BindableColor
  • BindableEntity
  • BindableField
  • BindableParagraph
  • BindableResponseTag
  • BindableSpreadsheet
  • BindableSpreadsheetColumn
  • BindableTaskDisplayScreen
  • BindableText
  • BindableTextArea
  • ButtonBar
  • Checkbox
  • Color
  • Coordinates
  • Dimensions
  • DropDown
  • Entity
  • Operator
  • Paragraph
  • Text
  • Toggle
  • Multiplayer-Specific Classes
  • BindableMultiplayerPlayer
  • Game Builder-Specific Classes
  • Animation
  • AnimationClip

Overview


Welcome to Gorilla Form Fields Reference Guide!

Here you will find documentation of classes that you can use to script custom components for Gorilla's new tools, including Task Builder 2, Multiplayer and Game Builder.

Navigate menu to the left to access documentation for general and tool-specific classes.


For more guidance on scripting in Gorilla's newest tools, visit our Scripting page.

FormElementArray


Class FormElementArray creates an array of settings for an element.


Example Component

Mouse Button Response

Image showing a Mouse button response component with Mappings settings where one can select button and response.

Example Code

{ class: "FormElementArray", field: "mappings", label: "Mappings", schema: { elements: [ { class: "FormElementDropDown", field: "button", label: "Button", options: MouseButtonOptions }, { class: "FormElementBindableText", field: "response", label: "Response" } ] } }

FormElementAsset


Class FormElementAsset creates a setting that allows choosing an asset to upload, e.g. image, video, audio file etc.


Example Component

Audio

Image showing an Audio Clip component with an Audio asset setting one can choose the audio file for

Example Code

{ class: "FormElementAsset", field: "audio", label: "Audio", type: 'audio' },

FormElementBindableColor


Class FormElementBindableColor adds an option to choose a colour for an object.


Example Component

Background Color

Image showing a Background Color component with a background color setting and a Bind button to the right highlighted in red

Example Code

{ class: "FormElementBindableColor", field: "color", label: "Background Color" }

FormElementBindableEntity


Class FormElementBindableEntity creates an entity that can be bound to one of the existing objects.


Example Component

Trigger Animation

Image showing a Game Builder Trigger Animation animation from the Animator component, with a Target setting which has a dropdown menu with screen objects to select from and a Bind button to the right highlighted in red.

Example Code

{ class: "FormElementBindableEntity", field: "target", label: "Target", allowSelf: true }

FormElementBindableField


Class FormElementBindableField adds a field with a Set… button that, when clicked on, opens a binding settings window.


Example Component

Chat Box

Image showing a Chat Box component with a Network Data Field setting where one can set a data field using the Set button and a Bind button to the right

Example Code

{ class: "FormElementBindableField", field: "networkDataField", label: "Network Data Field", networkOnly: true }

FormElementBindableParagraph


Class FormElementBindableParagraph creates a paragraph field that can be typed in or bound to something.


Example Component

Markdown Text

Image showing a Markdown Text component with a bind button to the right highlighted in red

Example Code

{ class: "FormElementBindableParagraph", field: "text", label: "Raw Text", rows: 8 }

FormElementBindableResponseTag


Class FormElementBindableResponseTag adds a response tag that can be either selected from a dropdown menu, created anew, or bound to something.


Example Component

Keyboard Response

Image showing a tag setting with a dropdown menu and a bind button to the right highlighted in red

Example Code

{ class: "FormElementBindableResponseTag", field: "tag", label: "Tag" }

FormElementBindableSpreadsheet


Class FormElementBindableSpreadsheet adds a dropdown with existing spreadsheets to choose from.


Example Component

Change Difficulty - Spreadsheet

Image showing a Spreadsheet setting with a dropdown menu with available spreadsheets to choose from

Example Code

{ class: "FormElementBindableSpreadsheet", field: "spreadsheet", label: "Spreadsheet", }

FormElementBindableSpreadsheetColumn


Class FormElementBindableSpreadsheetColumn adds a dropdown with existing spreadsheet columns to choose from.


Example Component

Select Randomised Subset

Image showing an Assignment Column setting with a drop down menu with available spreadsheet column names to choose from

Example Code

{ class: "FormElementBindableSpreadsheetColumn", field: "column", label: "Column" },

FormElementBindableTaskDisplayScreen


Class FormElementBindableTaskDisplayScreen adds a dropdown with existing Screens to choose from.


Example Component

Branch

Image showing an Assignment Column setting with a drop down menu with screen names to choose from, and a bind button to the right highlighted in red

Example Code

{ class: "FormElementBindableTaskDisplayScreen", label: "Screen", field: "screen" }

FormElementBindableText


Class FormElementBindableText creates a text field that can be typed in or bound to something.


Example Component

Button

Image showing a Button component with a Label setting where one can set label text by typing it in the label field or by using the bind button to the right highlighted in red

Example Code

{ class: "FormElementBindableText", label: "Label", field: "label" }

FormElementBindableTextArea


Class FormElementBindableTextArea creates a text area that can be typed in or bound to something.


Example Component

Text

Image showing a Text component with a Text field one can type in and a bind button to the right highlighted in red

Example Code

{ class: "FormElementBindableTextArea", field: "text", label: "Text" }

FormElementButtonBar


Class FormElementButtonBar creates a bar with clickable buttons to choose from.


Example Component

Advanced Positioning

Image showing an Advanced Positioning component with a Unit setting where one can choose from free buttons on the bar: grid, percent or pixels. The pixels option is highlighted in red as an example of a selected button.

Example Code

{ class: "FormElementButtonBar", field: "unit", label: "Unit", options: [ { value: 'grid', label: 'Grid' }, { value: 'percent', label: 'Percent' }, { value: 'pixels', label: 'Pixels' } ], }

FormElementCheckbox


Class FormElementCheckbox adds a checkbox that can be checked and unchecked for different effects.


Example Component

Move Offscreen

Image showing a Game Builder Animation called Move Offscreen with three settings: side, duration and easing. The easing setting has a ticked checkbox next to it.

Example Code

{ class: "FormElementCheckbox", field: "easing", label: "Easing" }

FormElementColor


Class FormElementColor adds a color picker that allows setting a color for an element.


Example Component

Text Color

Image showing a Button component with a Text Color setting selected and a color picker on the screen.

Example Code

{ class: "FormElementColor", label: "Text Color", field: "textColor" }

FormElementCoordinates


Class FormElementCoordinates adds a setting that allows applying coordinates, e.g. for positioning, to an element.


Example Component

Fixation Cross

Image showing a Position setting where one can type in x and y coordinates

Example Code

{ class: 'FormElementCoordinates', field: 'position', label: 'Position', }

FormElementDimensions


Class FormElementDimensions adds a setting that allows choosing dimensions for the element.


Example Component

Hotspot

Image showing a Hotspot component with a Size setting with x and y dimensions fields set to example numbers: x to 10 and y to 50.

Example Code

{ class: "FormElementDimensions", field: "size", label: "Size" }

FormElementEntity


Class FormElementEntity creates a new entity.


Example Component

Trigger Audio

Image showing a Gorilla Game Builder Animation called Trigger Audio with a Target setting which has a dropdown menu with objects to select from

Example Code

{ class: "FormElementEntity", field: "target", label: "Target" }

FormElementOperator


Class FormElementOperator creates a list of operators that can be applied to the entity that they are added to.


Example Component

Change Difficulty - Spreadsheet

Image showing a Change Difficulty Spreadsheet component with a Conditions setting where one can set a Condition using a dropdown menu with a list of operators.

Example Code

{ class: "FormElementOperator", field: "condition", label: "Condition", rows: 8 }

FormElementParagraph


Class FormElementParagraph creates a paragraph field that can be typed in.


Example Component

HTML

Image showing an HTML component with a paragraph field one can type in

Example Code

{ class: "FormElementParagraph", field: "html", label: "HTML", rows: 8 }

FormElementText


Class FormElementText creates a text field that can be typed in.


Example Component

Button

Image showing a Button component with a Label setting that has a text field one can type in

Example Code

{ class: "FormElementText", label: "Label", field: "label" }

FormElementToggle


Class FormElementToggle adds a switch that can be turn on/off for different effects.


Example Component

Audio

Image showing a setting called Advance with a toggle to the right. The toggle is highlighted in red with the white ball to the right hand side illustrating that the Advance setting is switched on

Example Code

{ class: "FormElementToggle", field: "advanceOnFinish", label: "Advance" }

FormElementBindableMultiplayerPlayer


Class FormElementBindableMultiplayerPlayer adds a Player setting with a binding option.


Example Component

Multiplayer

Image showing a Multiplayer component with a Player setting and a bind button to the right highlighted in red

Example Code

{ class: "FormElementBindableMultiplayerPlayer", field: "player", label: "Player" }

FormElementAnimation


Class FormElementAnimation creates an animation for Gorilla Game Builder tool.


Example Component

Animator

Image showing an Animator component with an Animation setting which has a red button labelled Open Animation Tool.

Example Code

{ class: "FormElementAnimation", field: "clips", label: "Animation" }

FormElementAnimationClip


Class FormElementAnimationClip creates a separate animation clip within an animation in Gorilla Game Builder tool.


Example Component

Animator

Image showing an Animator component with a Play On Start setting which has a dropdown menu with animation clips to select.

Example Code

{ class: "FormElementAnimationClip", field: "playOnStart", label: "Play On Start" }