How to mimic lua tables in gdscript.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Telknor

I’m working on a project that requires ship building similar to what is seen in the game Istrolid on steam. I have a working example of how to recreate it in lua inside the Love game engine but that isn’t really doing me any good in godot 3.2.1 as I don’t know how to recreate the lua code in gdscript. Thank you for your help and time on this.

:bust_in_silhouette: Reply From: jgodfrey

Since Lua tables are really just collections of key/value pairs, I’d say the most similar data structure in Godot would be a Dictionary. See the docs here:

I’ll take a look at that. Thank you.

Telknor | 2020-05-14 23:13