I want to create a set of filters that will stay consistent from one session to the next. I believe the best way to do this is with the GetVariable and SetVariable functions.
However, I'm also hoping to be able to have the variables in a set of tables, such that the final object might look like this for ease of comparisons:
beaconfilter = {
asteroid = {text = false, sound = false},
cargo = {text = false, sound = false},
cloud = {text = false, sound = false},
mineable = {text = false, sound = false},
organic = {text = false, sound = false}}
I could, in theory, populate the table with GetVariable on world open using a nested set of for loops.
In so doing, however, the sub-tables would be populated with "true" and "false" strings rather than true and false bools.
A few questions, then:
1. Am I off my rocker in terms of this approach?
2. If this approach is decent, how might I convert the GetVariable results to bools so I don't have to worry about quite so many quote marks when processing the code?
Thanks!
However, I'm also hoping to be able to have the variables in a set of tables, such that the final object might look like this for ease of comparisons:
beaconfilter = {
asteroid = {text = false, sound = false},
cargo = {text = false, sound = false},
cloud = {text = false, sound = false},
mineable = {text = false, sound = false},
organic = {text = false, sound = false}}
I could, in theory, populate the table with GetVariable on world open using a nested set of for loops.
In so doing, however, the sub-tables would be populated with "true" and "false" strings rather than true and false bools.
A few questions, then:
1. Am I off my rocker in terms of this approach?
2. If this approach is decent, how might I convert the GetVariable results to bools so I don't have to worry about quite so many quote marks when processing the code?
Thanks!