RbxUtility (Library): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>XLEGOx
No edit summary
>JulienDethurens
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
==The API==
==The API==


{{:EncodeJSON_(Function)}}
{{:EncodeJSON (Function)}}
{{:DecodeJSON_(Function)}}
{{:DecodeJSON (Function)}}
{{:CreateSignal_(Function)}}
{{:CreateSignal (Function)}}


'''NOTE: There is also a MakeWedge function, but it shouldn't be used. Instead, use the [[AutowedgeCell_(Method)|AutowedgeCell]] or [[AutowedgeCells_(Method)|AutowedgeCells]] method of [[RBX.lua.Terrain (Object)|Terrain]].'''
'''NOTE: There is also a MakeWedge function, but it shouldn't be used. Instead, use the [[AutowedgeCell (Method)|AutowedgeCell]] or [[AutowedgeCells (Method)|AutowedgeCells]] method of [[RBX.lua.Terrain (Object)|Terrain]].'''


==See Also==
==See Also==

Latest revision as of 05:08, 9 February 2012

RbxUtility is a RbxLibrary that provides functions for various uses. It contains a JSON encoder and a JSON decoder, which can be used to store tables as strings and convert them back to tables, but also some other useful functions that can be useful for different things.

The API

EncodeJSON( table table_to_encode )
Returns string encoded_table
Description: Returns the table encoded as a JSON string.


DecodeJSON( string encoded_table )
Returns table decoded_table
Description: Returns a table with all parsed JSON values.


CreateSignal( )
Returns LuaSignal
Description: Returns a LuaSignal object which acts much like the real RBXScriptSignal objects, which ROBLOX events use, only implemented in-Lua for full control from within scripts.


NOTE: There is also a MakeWedge function, but it shouldn't be used. Instead, use the AutowedgeCell or AutowedgeCells method of Terrain.

See Also