I'm trying to make a dialogue system with multiple characters and I want it to switch between the characters, is there anyway to access the characters value from this code?:
local dialouge = {
["NewRound"] = {
Dialogues = {
["A New Round Is About to begin!"] = {
Character = {"Celestia"};
Pose = {"Happy"};
};
["This round will take place on ".. currentmap] = {
Character = {"Toenail"};
Pose = {"Happy"};
};
["Have fun!"] = {
Character = {"Toenail"};
Pose = {"Cheer"};
};
}
}
}
#Getting value of something in a table
3 messages · Page 1 of 1 (latest)
You can index a table using dot syntax or bracket syntax. For example,
tab = {
A = 1,
B = 2
}
print(tab.A) -- 1
print(tab["A"]) -- 1
Character value I assume you mean the value for the Character key in your table. You would do ...Character[1] since the value is another table, specifically an array