Module utils

Helper functions

Functions

tolua (value) Converts game value to Lua.
toobject (value) Converts Lua value to game object.
toarray (value) Converts Lua value to game array.


Functions

tolua (value)
Converts game value to Lua. This allows the modification of given value.

Parameters:

  • value The value to convert.

Returns:

    Lua type of the value.

Usage:

    player.speed = tolua(player.speed) + 10
toobject (value)
Converts Lua value to game object. This allows the usage of options in more complex functions.

Parameters:

  • value The value to convert.

Returns:

    The game object.

Usage:

    givelaser(toobject{ammo=5,reload=4})
toarray (value)
Converts Lua value to game array.

Parameters:

  • value The value to convert.

Returns:

    The game array.
generated by LDoc 1.4.6 Last updated 2019-09-24 19:24:02