The game_loop.script is the standard script, I didn't modify it. As Azrael said, it should work, but I don't understand why it doesn't.
Anyway here is how the caption is treated in the standard game_loop.script
// handle the standard foating caption
if(Game.Interactive && ActObj!=null)
{
if (Game.SelectedItem==null)
{
WinCaption.X = Game.MouseX;
WinCaption.Y = Game.MouseY + 20;
WinCaption.TextAlign = TAL_LEFT;
WinCaption.Text = ActObj.Caption;
// keep the caption on screen
WinCaption.SizeToFit();
if(WinCaption.X + WinCaption.Width > Game.ScreenWidth) WinCaption.X = Game.ScreenWidth - WinCaption.Width;
if(WinCaption.Y + WinCaption.Height > Game.ScreenHeight) WinCaption.Y = Game.ScreenHeight - WinCaption.Height;
}
// handle the caption when you want to use an object with another
else {
var Item = Game.SelectedItem;
WinCaption.X = 0;
WinCaption.Y = 684;
WinCaption.Width = Game.ScreenWidth;
WinCaption.TextAlign = TAL_CENTER;
WinCaption.Text = "Use " + Item.Caption + " with " + ActObj.Caption;
}
WinCaption.Visible = true;
WinCaption.Focus();
}
else WinCaption.Visible = false;
But it only works when I use the object from the inventory. If I try to use it from the GUI icon, there's no caption.
I think I'm just going to code a new caption, for the case in which the item is selected via the icon. If anyone might have a clue as to why it's not working, let me know.
Edit: I also tried what Azrael said: having a hotspot in a scene and when i click on the hotspot, Game.SelectedItem = "item". The caption doesn't work in this case either. It's interesting