Thanks Ashen, I've just got it working and came to post my soloution, I will optimize my code as per your suggestions as they make a lot of sense, if its my weakest failing in coding anything, its that I wrap myself up in knots, and end up with complex soloutions to simple problems, here is the code I have that is currently working 100%
the code for notebook entries are placed in the script of any event you want to trigger an entry, eg using a computer or examining a fridge.
NBList is the ListBox
NBDisplay is the textbox
Global Message 982 states "Your Notebook has been Updated."
//This is the Entry placed in the code for an event, adds it to the Notebookl
NBlist.AddItem("John's Journal Entry");
Game.GlobalStrings[0] = "According to John's journal, there is a safe in the study,";
DisplayMessage(982);
//This is the Entry placed in the code for an even to it adds it to the Notebook
NBlist.AddItem("Kitchen Note");
Game.GlobalStrings[1] = "John for some strange reason wrote the word Password on the fridge";
DisplayMessage(982);
// This is the script for the the listbox
function NBlist_SelectionChanged(GUIControl *control) {
String seltex = NBlist.Items[NBlist.SelectedIndex];
if (seltex.CompareTo("John's Journal Entry") == 0){
NBDisplay.Text = (Game.GlobalStrings[0]);
}
if (seltex.CompareTo("Kitchen Note") == 0){
NBDisplay.Text = (Game.GlobalStrings[1]);
}
// and so on and so forth
}
EDIT right this is the final code, interestingly, you cannot export/import strings, so I had to stick with Globalstrings, but it should be fine. thanks again!
the code for notebook entries are placed in the script of any event you want to trigger an entry, eg using a computer or examining a fridge.
NBList is the ListBox
NBDisplay is the textbox
Global Message 982 states "Your Notebook has been Updated."
//This is the Entry placed in the code for an event, adds it to the Notebookl
NBlist.AddItem("John's Journal Entry");
Game.GlobalStrings[0] = "According to John's journal, there is a safe in the study,";
DisplayMessage(982);
//This is the Entry placed in the code for an even to it adds it to the Notebook
NBlist.AddItem("Kitchen Note");
Game.GlobalStrings[1] = "John for some strange reason wrote the word Password on the fridge";
DisplayMessage(982);
// This is the script for the the listbox
function NBlist_SelectionChanged(GUIControl *control) {
String seltex = NBlist.Items[NBlist.SelectedIndex];
if (seltex.CompareTo("John's Journal Entry") == 0){
NBDisplay.Text = (Game.GlobalStrings[0]);
}
if (seltex.CompareTo("Kitchen Note") == 0){
NBDisplay.Text = (Game.GlobalStrings[1]);
}
// and so on and so forth
}
EDIT right this is the final code, interestingly, you cannot export/import strings, so I had to stick with Globalstrings, but it should be fine. thanks again!