Hi. I’m making a character/class select screen for my fighting game and when you select a class it shows their movelist on a scrolling frame through textlabels, which looks like this:
Character select screen:
I want to re-use this scrolling frame rather than making a scrolling frame with textlabels for each class’ movesets, but I’m trying to figure out how I’d go about this. I have a semi-idea, but can’t really figure out how I’d go about it.
Basically, I chose to store each move description for a class as a separate string inside a table for each class. Like this:
local class1Info = {
"This move does this",
"This move does that",
"This punch does this",
etc...
}
local class2Info = {
"This move does that move woah.",
"This move activates that."
etc...
}
And i would also have a table for each textlabel in the scrolling UI:
local labelTable = {
Selectscreen.ScrollingUI.Label1,
Selectscreen.ScrollingUI.Label2,
Selectscreen.ScrollingUI.Label3,
Selectscreen.ScrollingUI.Label4,
etc
}
I think there might be a way to go about this but I’m not too sure. Maybe a for loop? Any help would be greatly appreciated.