Problem - this SHOULD work, yes?

Started by Rui 'Trovatore' Pires, Thu 09/12/2004 15:23:31

Previous topic - Next topic

Rui 'Trovatore' Pires

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?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.


Rui 'Trovatore' Pires

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.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

Which AGS version are you using? Any chance you could upload a game that demonstrates the problem?

Rui 'Trovatore' Pires

#4
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.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

So wait .. does it work or not work in the file you uploaded?

Rui 'Trovatore' Pires

I have no idea anymore. ??? I don't know how/when it got fixed.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SMF spam blocked by CleanTalk