Files
Basalt/docs/docs1_6/objects/Basalt/setVariable.md
Robert Jelic d4c72514ef Docs 1.6
Accidentally uploaded outdated 1.6 docs
2023-05-01 16:28:46 +02:00

432 B

Basalt

setVariable

This stores a variable which you're able to access via xml. You are also able to add a function, which then gets called by object events created in XML.

Parameters

  1. string a key name
  2. any any variable

Usage

  • Adds a function to basalt.
basalt.setVariable("clickMe", function()
    basalt.debug("I got clicked")
end)

<button onClick="clickMe" text="Click me" />