Skip to content

Add more vars to actions

Lactozilla requested to merge action-args into next

New:

  • Lifted restriction of 2 vars per state (maximum is now 8)
  • Lifted restriction of 2 arguments per action
  • Lua: Added vars[] to states
    • This is 1-indexed, so vars[1] is the first var, vars[2] is the second var, etc.
    • Accepts a table when setting (maximum accepted amount of vars is 8)
  • SOC: Added VAR3 to VAR8
  • Added dynamic typing to vars. Types:
    • integer
    • boolean (true, false)
    • string
    • null

Backwards compatible:

  • state.var1 is equivalent to state.vars[1]
  • state.var2 is equivalent to state.vars[2]

Backwards incompatible:

  • Calling actions scripted with Lua without the sufficient number of arguments will push nil instead of the number zero.

Example for testing: action_test.wad

Edited by Lactozilla

Merge request reports

Loading