Hitting character limit on item descriptions. Can this limit be removed?

Started by ace14790, Sat 04/12/2010 18:59:27

Previous topic - Next topic

ace14790

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.



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.



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.

Matti


Just check if the mouse is over an item and use Label.Text="bla" to display a longer String.

ace14790

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.

Matti

Code: ags

  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.

ace14790

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.

Matti

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:


Code: ags

// 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  ;)

ace14790

I got it.  Thank you very much for your help, Matti.  I greatly appreciate it.

SMF spam blocked by CleanTalk