Element Referencing
Functions referring to elements
element
shortname: ele
- How:
self:element_index()
- What: Returns the value of the element # number.
- Example: Inputting the code
print(self:element_index())
into a Code Block will output the # number of the control element into the debug field. E.g. this Code Block on the top left button will output the message0
. By default all Grid configurations use this function to define a local variable namednum
on each interactable event, such as a potmeter. Thisnum
variable is given value based on theself:element_index()
function.
element name
shortname: gen
- How:
self:element_name("name")
- "name": string, put between " " or ' ' symbols
- What: This function gives a name to the control element, or when called without parameters, it returns the name of the control element as a string. IMPORTANT: The name will only work, if it's put in the first place of the action chain.
- Example: The function
self:element_name("helloworld")
in a code block, put in the top of the action chain, will name the control element helloworld.
element name send
shortname: gens
- How:
self:element_name_send()
- What:
- Example: