possibility to use [1][2] in table definings
Posted: Sun Jul 24, 2016 10:30 am
I just ended, once again to the situation where I am making table of "triggers" to 2 dimensional map.
Idea is that I have this:
Then i start making some blocks being triggers:
Especially when there are several triggers, it becomes bit ugly, hence i would rather just do:
making code much more readable.
But would it be possible to make Hollywood this way, as automatically defining table Triggers[2], since this is the problem basically that Triggers[2] is not defined when trying to define its index [3].
Idea is that I have this:
Code: Select all
Map = {
[1] = {1, 2, 3}
[2] = {1, 2, 3}
[3] = {1, 2, 3}Code: Select all
Triggers = {
[2] = { [3] = {trigger} }
}Code: Select all
Triggers = {
[2][3] = {trigger}
}But would it be possible to make Hollywood this way, as automatically defining table Triggers[2], since this is the problem basically that Triggers[2] is not defined when trying to define its index [3].