My problem? ACS doesn't allow for multi-dimensional arrays. Thanks to this, a strange system I've been working on is now in a state of panic. For you see, I cannot think of a simple way to achieve what I'm doing without this.
Basically, I have a three-dimensional array that contains data for several text-display terminals in the map. Each entry in the array has three levels: the terminal being accessed, what screen the terminal is displaying (hitting "use" cycles through the different screens on a single terminal), and the line of text being displayed. Yes, there is a reason for each line being defined seperately. Bear with me here.
The array setup I'd like to use would look something like this hacked sample:
Code: Select all
global str 1: termtext[][][];
termtext[0][0][0] = "Terminal 0, Screen 0, Line 0"
termtext[0][0][1] = "Terminal 0, Screen 0, Line 1"
termtext[0][0][2] = "Terminal 0, Screen 0, Line 2"
termtext[0][1][0] = "Terminal 0, Screen 1, Line 0"
termtext[0][1][1] = "Terminal 0, Screen 1, Line 1"
termtext[0][1][2] = "Terminal 0, Screen 1, Line 2"
termtext[1][0][0] = "Terminal 1, Screen 0, Line 0"
termtext[1][0][1] = "Terminal 1, Screen 0, Line 1"
termtext[1][0][2] = "Terminal 1, Screen 0, Line 2"
termtext[1][1][0] = "Terminal 1, Screen 1, Line 0"
termtext[1][1][1] = "Terminal 1, Screen 1, Line 1"
termtext[1][1][2] = "Terminal 1, Screen 1, Line 2"
Now, as you see, this would work flawlessly on a map scope, but my intention was to have the strings defined in a script library, to be accessed through any map at any time. And thus, my system cannot work because global variables don't support more than one dimension. I'm sure there's some type of strange technical limitation which prevents ZDoom from supporting such a feature, so I will instead take another route...
Can any kind soul provide me with a simple method to "simulate" such a system using only single-dimensional arrays? I'd hate to see this idea of mine go down the drain. If I can get this system working, the methods of implementing the screens in-map would be far simpler and not nearly so hellish to set up. However, that means I'd have to overcome this obstacle... how fitting.
Thanks for at least trying to make sense of this strange "request"...