Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Rui 'Trovatore' Pires on Thu 09/12/2004 15:23:31

Title: Problem - this SHOULD work, yes?
Post by: Rui 'Trovatore' Pires on Thu 09/12/2004 15:23:31
string temploc;
GetLocationName(mouse.x, mouse.y, temploc);
if (GetInvAt(mouse.x, mouse.y)!=-1) GetInvName(GetInvAt(mouse.x, mouse.y), temploc);
SetLabelText(ACTION, 0, temploc);


This should work. The label should be updated with the name of what's under the cursor, and then overwritten with the name of the INV item, if available.

This isn't happening, though. When it comes to INV items, the label is just blank. Just blank. Plus, I checked with a couple Display commands - the string temploc IS getting correctly updated.

Can anyone help me?
Title: Re: Problem - this SHOULD work, yes?
Post by: strazer on Thu 09/12/2004 15:48:38
http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=80 ?
Title: Re: Problem - this SHOULD work, yes?
Post by: Rui 'Trovatore' Pires on Thu 09/12/2004 16:25:33
QuoteIf a GUI label is shorter than the single word (no spaces) it should display, it blanks out instead of displaying as much as possible.
This isn't the case, though. the actual label is 320 pixels wide, the GUI is what gets resized along the way. Besides, the hotspot name "sea" appears, but the name of the inv item "key" doesn't.
Title: Re: Problem - this SHOULD work, yes?
Post by: Pumaman on Thu 09/12/2004 17:40:19
Which AGS version are you using? Any chance you could upload a game that demonstrates the problem?
Title: Re: Problem - this SHOULD work, yes?
Post by: Rui 'Trovatore' Pires on Thu 09/12/2004 17:44:08
I'm using the newest. Hang on, I'll upload it shortly. Still making adjustments of another nature.

EDIT - (link removed) Hang on, I did something I shouldn't... I'll reupload soon...
I hope I didn't overlook something idiotically simple... AGAIN... :P

EDIT 2 - Here it is, sorry about that.

http://www.2dadventure.com/ags/LSL7.zip

But there's two things you'll have to do (cause I forgot AGAIN!). Add GUIOff(16); to game_start and make sure the player starts with those two inv items (I don't remember if their "player starts with these" checkboxes are filled...

EDIT 3 - Someone up there is having a big big laugh at my expense...

...I'm very sorry, but it works now. No idea how this all happened, or what changed it. Sorry.
Title: Re: Problem - this SHOULD work, yes?
Post by: Pumaman on Fri 10/12/2004 00:59:59
So wait .. does it work or not work in the file you uploaded?
Title: Re: Problem - this SHOULD work, yes?
Post by: Rui 'Trovatore' Pires on Fri 10/12/2004 07:59:57
I have no idea anymore. ??? I don't know how/when it got fixed.