Hotspots description in the GUI.

Started by Thegluestickman, Tue 22/12/2009 20:05:34

Previous topic - Next topic

Thegluestickman

I've recently taken up AGS after a long period without touching it, and I'm relearning the ropes. I have a question though, when you name hotspots then test your game and you hover over your hotspot, how do you make the name of the hotspot appear in the text box in the GUI?

Ryan Timothy B

You'll have to make a GUI with a text label.
Then inside the text label type this: @OVERHOTSPOT@
AGS does the rest.

Atelier

Sorry to thread-jack Gluestickman, but I was just wondering how character names could be displayed in a similar way when you hovered over them? Using the same label for objects and people, of course.

Ryan Timothy B

It's called @OVERHOTSPOT@ but it does the same for objects, hotspots, and characters--displays the name. 
The name of this function really doesn't suit what it does.

Thegluestickman

Thank you, I knew it was something easy I wasn't sure though. Thanks.

Dualnames

Quote from: Thegluestickman on Wed 23/12/2009 01:05:09
Thank you, I knew it was something easy I wasn't sure though. Thanks.

If you want the name of the hotspot or object or character to change at some point, for example have a hotspot that's called opened door, and then have it closed door, you should use custom properties.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

monkey0506

How would that work? Custom properties are read-only at run-time. So you could set a custom property for "open", but then you could never change it during the game...I don't see how custom properties would be useful in this situation. For characters the Character.Name property is writable, but for the others you would need to manually store a change to the name and hard-code an exception to custom code in rep_ex using Game.GetLocationName. There's not really a "quick 'n' simple" solution to changing a hotspot or object name at run-time. It's easily possible if you know how to code it, but not as trivial as changing a character's name. Oh and...was this intended as just an "FYI" sort of thing...because it wasn't asked anywhere...

Dualnames

Quote from: monkey_05_06 on Sun 27/12/2009 19:17:34
How would that work? Custom properties are read-only at run-time. So you could set a custom property for "open", but then you could never change it during the game...I don't see how custom properties would be useful in this situation. For characters the Character.Name property is writable, but for the others you would need to manually store a change to the name and hard-code an exception to custom code in rep_ex using Game.GetLocationName. There's not really a "quick 'n' simple" solution to changing a hotspot or object name at run-time. It's easily possible if you know how to code it, but not as trivial as changing a character's name. Oh and...was this intended as just an "FYI" sort of thing...because it wasn't asked anywhere...

I make it happen. There;s a module that's called custom properties or something that allows a workaround for this.
You can use two properties for the hell of it. One initial and one that it will change.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

monkey0506

You might be referring to a certain module that a certain member (cough, cough) wrote, but that's not to be confused with the built-in custom properties which cannot be changed at run-time (during the game). What you said was somewhat ambiguous if you actually meant the module. ;)

Dualnames

Quote from: monkey_05_06 on Sun 27/12/2009 20:07:52
You might be referring to a certain module that a certain member (cough, cough) wrote, but that's not to be confused with the built-in custom properties which cannot be changed at run-time (during the game). What you said was somewhat ambiguous if you actually meant the module. ;)

I meant what I said, but that doesn't mean anything. Ah. blast okay I forgot you can't change em at run-time and tried to save my mistake saying about your module. Damn you monkey!! :D
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk