natiny.script.destroy

Lua
natiny.script.destroy(script)

Ends a script this one started and frees everything in it.

Parameters

Name Type Description
script number The script to end

Example

Lua
natiny.script.call(mod, "on_unload")
natiny.script.destroy(mod)

Notes

  • Engine handles that script created - windows, meshes, bodies - are not destroyed with it. They belong to the engine.