Tables in interfaces

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
User avatar
neero
001 Subscriber
 
Joined: Sun Jul 18, 2010 2:46 pm
Location: Norway

Tables in interfaces

Postby neero » Sun Sep 24, 2017 5:43 pm

What's the best way of showing information with multiple values in an interface?

Currently I have a table with multiple rows and columns with data. One of the columns is the ID for each entry in the table.
To display this in an interface, I have copied each column of the table into its own collection.

I have placed fields in the interface which displays each collection. One of the fields are clickable, so I had to associate this field to the field which have the ID collection. (For some reason this generates a warning in the editor, which I can click "continue" on).
Since I cannot make the ID field invisible (it makes the association not work), I have made the text transparent instead.

I find this whole setup very strange, so I wonder if this is really the way to do this? I am not bound to use tables, but it seems this is the only place where you can have multiple values stored that are connected to each other.

001tables.png
001tables.png (5.88 KiB) Viewed 597 times

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Tables in interfaces

Postby Mr.Numbers » Mon Sep 25, 2017 2:43 pm

You can get away with only having the "Table ID" column setup as a collection, the rest do not need to be! Fill the "Spawning" collection with as many entries as there is Y values on the table. (Value being 1 to n table Y size)
Place the spawning field on the interface, then create a new field for each "X" value on the interface.You then associate these fields to the "Table ID" field. This makes it so every time a new entry is made in the "Table ID" collection, it will create all the fields for the various "X Values".
Then, for the "Retrieve Value" for your "X Value" fields, you simply use the "Element of table" use-value, where Y is the "Field Associate Value" use-value, and X is the pre-determined X value for the field.

IF you needed the X size to be dynamic, there IS more shenanigans you can do, but it complicates things :P Setting things up the way above though will cut it down to 1 spawning collection needed and will feel less janky.
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

User avatar
neero
001 Subscriber
 
Joined: Sun Jul 18, 2010 2:46 pm
Location: Norway

Re: Tables in interfaces

Postby neero » Mon Sep 25, 2017 6:08 pm

Works perfect! Thanks! :D

It messed up some other stuff, but that's fixable by using multiple interfaces instead of reusing the same fields to show other tables. Seems it is not possible to change the collection or retrieved text from a field? (or I'm doing it wrong). Anyways, it's not necessary to over complicate stuff when I just can create another interface :3


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron