Author Topic: Hotspots description in the GUI.  (Read 867 times)

Thegluestickman

  • Posts: 9
Hotspots description in the GUI.
« on: 22 Dec 2009, 20:05 »
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

  • Posts: 2,834
    • I can help with play testing
    • I can help with scripting
    • Ryan Timothy B worked on a game that was nominated for an AGS Award!
Re: Hotspots description in the GUI.
« Reply #1 on: 22 Dec 2009, 20:15 »
You'll have to make a GUI with a text label.
Then inside the text label type this: @OVERHOTSPOT@
AGS does the rest.

Atelier

  • Posts: 1,628
Re: Hotspots description in the GUI.
« Reply #2 on: 22 Dec 2009, 21:04 »
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

  • Posts: 2,834
    • I can help with play testing
    • I can help with scripting
    • Ryan Timothy B worked on a game that was nominated for an AGS Award!
Re: Hotspots description in the GUI.
« Reply #3 on: 22 Dec 2009, 21:56 »
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

  • Posts: 9
Re: Hotspots description in the GUI.
« Reply #4 on: 23 Dec 2009, 01:05 »
Thank you, I knew it was something easy I wasn't sure though. Thanks.

Dualnames

  • AGS Baker
  • Posts: 7,189
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    •  
    • Dualnames worked on a game that was nominated for an AGS Award!
Re: Hotspots description in the GUI.
« Reply #5 on: 27 Dec 2009, 00:20 »
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.
No more military army stuff. I'm alive and back.

monkey0506

  • Posts: 7,031
  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
Re: Hotspots description in the GUI.
« Reply #6 on: 27 Dec 2009, 19:17 »
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

  • AGS Baker
  • Posts: 7,189
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    •  
    • Dualnames worked on a game that was nominated for an AGS Award!
Re: Hotspots description in the GUI.
« Reply #7 on: 27 Dec 2009, 19:28 »
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.
No more military army stuff. I'm alive and back.

monkey0506

  • Posts: 7,031
  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
Re: Hotspots description in the GUI.
« Reply #8 on: 27 Dec 2009, 20:07 »
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

  • AGS Baker
  • Posts: 7,189
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    •  
    • Dualnames worked on a game that was nominated for an AGS Award!
Re: Hotspots description in the GUI.
« Reply #9 on: 27 Dec 2009, 20:59 »
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
No more military army stuff. I'm alive and back.