Writerstix77
Member
I have an array that is almost 100 units in height (and 3 in length). Here is just a sampling:
TextBox [0,0] = Wrench_obj //The object that is hovered over.
TextBox [0,1] = "Wrench: " //Name of item
TextBox [0,2] = "A heavy tool used to work pipes." //Description of item.
TextBox [1,0] = Pliers_obj
TextBox [1,1] = "Pliers: "
TextBox [1,2] = "These are needle-nosed."
TextBox [2,0] = Saw_obj
TextBox [2,1] = "Handsaw: "
TextBox [2,2] = "The old way to CTRL+X."
TextBox [3,0] = Bucket_Empty_obj
TextBox [3,1] = "Empty Bucket: "
TextBox [3,2] = "An empty bucket; there's nothing in it."
TextBox [4,0] = Bucket_Water_obj
TextBox [4,1] = "Bucket of Water: "
TextBox [4,2] = "This bucket is full of high quality H2O."
What I am trying to achieve is when the cursor mouses-over an object, it will display text in the bottom left-hand side of the screen. Ideally, the code would be something like: if the hovered-over object is [x,0] then draw the string [x,1] and string [x,2] at (600, 50). So if it is the Wrench_obj that is hovered over, it displays "Wrench: A heavy tool used to work pipes." But if it is the Bucket_Empty_obj that is hovered over, it displays: "Empty Bucket: An empty bucket; there's nothing in it." And so on.
My thinking is that by having all of these item names and descriptions in one place, I won't have to code all the separate messages for all 100 items. I've been struggling to figure this out, and after hours of no success, I turn to you, oh community, for help. Much appreciated.
TextBox [0,0] = Wrench_obj //The object that is hovered over.
TextBox [0,1] = "Wrench: " //Name of item
TextBox [0,2] = "A heavy tool used to work pipes." //Description of item.
TextBox [1,0] = Pliers_obj
TextBox [1,1] = "Pliers: "
TextBox [1,2] = "These are needle-nosed."
TextBox [2,0] = Saw_obj
TextBox [2,1] = "Handsaw: "
TextBox [2,2] = "The old way to CTRL+X."
TextBox [3,0] = Bucket_Empty_obj
TextBox [3,1] = "Empty Bucket: "
TextBox [3,2] = "An empty bucket; there's nothing in it."
TextBox [4,0] = Bucket_Water_obj
TextBox [4,1] = "Bucket of Water: "
TextBox [4,2] = "This bucket is full of high quality H2O."
What I am trying to achieve is when the cursor mouses-over an object, it will display text in the bottom left-hand side of the screen. Ideally, the code would be something like: if the hovered-over object is [x,0] then draw the string [x,1] and string [x,2] at (600, 50). So if it is the Wrench_obj that is hovered over, it displays "Wrench: A heavy tool used to work pipes." But if it is the Bucket_Empty_obj that is hovered over, it displays: "Empty Bucket: An empty bucket; there's nothing in it." And so on.
My thinking is that by having all of these item names and descriptions in one place, I won't have to code all the separate messages for all 100 items. I've been struggling to figure this out, and after hours of no success, I turn to you, oh community, for help. Much appreciated.