What I'm aiming to do is to create a "logic" system, similar to what's used in the Ace Attorney: Investigations game. I have it that on a logic GUI, there's a label with "@overhotspot@", so it will display the description of the item. The logic GUI is an inventory window, displaying the inventory of a "cLogicInventory" character.
(http://i988.photobucket.com/albums/af6/ace14790/overhotspot1.jpg)
When the player picks up a key, I add two things. A "iKey" for the player, and an "iLogicKey" for the LogicInventory.
So, I tested it with a short description, and when there's an item, for example, iLogicKey, in the LogicInventory, it pops up inside the inventory, and the description appears inside the label.
(http://i988.photobucket.com/albums/af6/ace14790/overhotspot2.jpg)
This is where I have a problem, though. I want to give the iLogicKey a longer description. Something like "I found this key lying on a table inside. I wonder what it has to do with this case?". However, when I go to compile the game, I get an error, saying that I've exceeded the character limit for descriptions, saying that the max length for the description is 24 characters.
Is it possible to remove the limit on item descriptions or otherwise work around it? I would like to implement this, if possible.
I'm quite new to AGS, so any help I can get would be greatly appreciated. Thank you.
Just check if the mouse is over an item and use Label.Text="bla" to display a longer String.
Matti, I did as you suggested:
Quote
function iLogic_Key_Interact()
{
Label8.Text=("It's a key. I found it lying on the table of the guy's house. I wonder what it has to do with all this?");
}
Now it shows the full string. Thank you very much.
But now my question is how do I make it appear when the mouse hovers over said item? Again, thank you for the help.
Label.Text = "";
InventoryItem *item = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
if(item == iKey) Label.Text = "This is a key.";
else if(item == iWallet) Label.Text = "This is my wallet.";
// etc.
Could you expand upon that a little more? I don't know where to place that in the script exactly to make it work. I'm sorry for the inconvenience.
As I understand your situations you should put it in the repeatedly execute function and check whether the Logic GUI is visible or not, like this:
// rep-exe
if (gLogicMenu.Visible){
Label.Text = "";
InventoryItem *item = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
if(item == iKey) Label.Text = "This is a key.";
else if(item == iWallet) Label.Text = "This is my wallet.";
// etc.
}
I hope that's the way you want it to have, cause I have to go right now ;)
I got it. Thank you very much for your help, Matti. I greatly appreciate it.