Author Topic: MODULE: Description v1.06 - Display hotspot description  (Read 32356 times)

thebaddie

  • Posts: 99
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #20 on: 10 Jan 2008, 17:22 »
create a label, and pass the name you give it in the gui editor to the gui mode script function...

i can't understand how to do this step...

can someone please post an example to explain me where exactly i have to set the label name?

is this the correct piece of script?:
Code: [Select]
function Descriptions::GUIMode(GUIControl *gc) {
  this.OLTidy();
  if (gc==null) {
Display("ERROR! null GUIControl passed to Description.GUIMode, contact game author");
return -1;
  }
  this.DisplayType=eDescDisplayGUIControl;
  this.gc=gc;
}

bogdy103

  • Posts: 4
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #21 on: 09 Mar 2008, 14:57 »
Hello! I'm new into the world of AGS but still using the help I could make a game;
I didn't quite understand what I have to do or to change in the script so the description of the hotspot appear (preferably next to the cursor) in any cursor mode. Could you explain what I have to do?

SSH

  • Posts: 5,710
  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #22 on: 10 Mar 2008, 11:34 »
create a label, and pass the name you give it in the gui editor to the gui mode script function...

i can't understand how to do this step...

can someone please post an example to explain me where exactly i have to set the label name?


In your game_start function, call

Code: [Select]
Description.GUIMode(gMYGUINAMEGOESHERE);

Hello! I'm new into the world of AGS but still using the help I could make a game;
I didn't quite understand what I have to do or to change in the script so the description of the hotspot appear (preferably next to the cursor) in any cursor mode. Could you explain what I have to do?

Put this in your game_start function:
Code: [Select]
Description.OverlayMode();
Description.Location=eDescLocationFollow;




bogdy103

  • Posts: 4
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #23 on: 10 Mar 2008, 18:00 »
Thanks! I couldn't understand where to put these functions!

kkmic

  • Posts: 12
  • Unidentified
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #24 on: 06 Jul 2008, 22:20 »
Has anyone tried this module with AGS3+? I'm using 3.0.2 and i'm getting a white background OVER the description text.

Can anyone recommend another module if this one has issues with 3.0.2? I would prefer modules instead of plug-ins.

SSH

  • Posts: 5,710
  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #25 on: 06 Jul 2008, 23:17 »
Can you give more detail? What settings are you using, most pertinently, Overlay or GUI mode?

kkmic

  • Posts: 12
  • Unidentified
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #26 on: 07 Jul 2008, 10:18 »
These are my settings (in the game_start section):
Code: [Select]
Description.Location=eDescLocationFollow;
Description.OffsetX=0;
Description.OffsetY=0;

Everything else is default (and that means overlay). Even with the overlay mode explicitly defined in the game_start section, the end result is the same.

What I get is this:


To the right of the character is a hotspot (the character is not currently on the hotspot). It has a different description, but I get an identical sized box.

There seem to be some text in that box, as the yellow "dots" from topside differ from the character to the hotspot.

Anything  more that I can do to help tracking down the problem?

SSH

  • Posts: 5,710
  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #27 on: 07 Jul 2008, 11:00 »
I've just tried your setup out with AGS 3.0.2 SP1 and it works fine for me. Can you:

* Make sure you're using 3.0.2 SP1 as CJ fixed a coupel of last-minute bugs
* Tell me the bit-depth of your game and background
* Upload the game folder (not compiled, the source) so I can try it out?

kkmic

  • Posts: 12
  • Unidentified
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #28 on: 07 Jul 2008, 12:09 »
AGS version: 3.0.2 June 2008, Build 3.0.2.44 (I downloaded it less than 24 hours ago)
Game depth: 32 bit
Background depth: 32 bit

You can find the test files here (rar archive).

It's just a test, not a game. I'm just gathering assets ATM.

Hope this helps. The text under the cursor is something that i really want in my game (if i'll manage to finish it :D).

If you find the solution tot the  problem (it may be related to the color depth), I would like to make one request:
It would be possible to vertically align the text center with the cursor center?

SSH

  • Posts: 5,710
  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #29 on: 07 Jul 2008, 12:55 »
I messed around with bit depths, etc. but it didn't make any difference. The yellow dots are the text: the font you are using seems corrupted as I couldn't get it to display properly at all in a GUI or overlay, no matter what. I loaded a new font and it worked fine. However, the white box behind seemed to stay no matter what I did. This is very puzzling. I also treid creatign a enw game from the Default template and then importing Description and using your settings and there's no white BG there.

AHAHAH!

Found it. If you have your speech style set to SierraWithBackground, Text Overlays seem to acquire this white background. Looks like an AGS bug to me...


EDIT:
For centred text, you can edit line 83 of Description.asc:
Code: [Select]
this.x = mouse.x + this.OffsetX;
becomes
Code: [Select]
this.x = mouse.x + this.OffsetX - (this.width/2);

Although, I can add an alignment setting when I get around to description 1.06...
« Last Edit: 07 Jul 2008, 13:00 by SSH »

kkmic

  • Posts: 12
  • Unidentified
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #30 on: 07 Jul 2008, 18:05 »
Thanks mate. Both for the info and for the center quickfix.

DazJ

  • Posts: 348
    • I can help with animation
    • I can help with backgrounds
    • I can help with characters
    • I can help with story design
    • I can help with voice acting
    • I can help with web design
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #31 on: 07 Jul 2008, 22:51 »
Anyone know where this can be downloaded? The link is dead :(

SSH

  • Posts: 5,710
  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #32 on: 07 Jul 2008, 23:06 »
OK, sorry... link now fixed.

You should always be able to find my modules if you go to my home page and follow the links there

SSH

  • Posts: 5,710
  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #33 on: 08 Jul 2008, 11:30 »
I've uploaded v1.06 which fixes your problem, kkmic, even in that speech mode. It also adds an alignment option.

kkmic

  • Posts: 12
  • Unidentified
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #34 on: 08 Jul 2008, 12:29 »
I need a kiss smiley  ;D

Thanks mate. I'll give it a try later today. Though I believe that a lucasarts style speech will fit better with my game than sierra with backgrund.

DazJ

  • Posts: 348
    • I can help with animation
    • I can help with backgrounds
    • I can help with characters
    • I can help with story design
    • I can help with voice acting
    • I can help with web design
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #35 on: 29 Jul 2008, 16:38 »
Is there anyway to disable to Descriptions of Object/Hotspots etc when the mouse cursor is in wait mode or when characters are talking? It looks sloppy when a cutscene is on but the player can still move the cursor and display the hotspots' and objects' descriptions.

Thanks in advance.
 
EDIT: EDIT: Fixed. I changed the

Description.NoDescriptionWhenMode;

setting.
« Last Edit: 29 Jul 2008, 16:43 by DazJ »

Gribbler

  • Posts: 1,489
  • I'm selling these fine leather jackets.
    • Gribbler worked on a game that was nominated for an AGS Award!
      Gribbler worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #36 on: 12 Sep 2008, 23:01 »
How can I change the font of decription text? I want it to be a bold one, like the one within the ags fonts (font 2).

SSH

  • Posts: 5,710
  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #37 on: 13 Sep 2008, 08:41 »
How can I change the font of decription text? I want it to be a bold one, like the one within the ags fonts (font 2).

From http://ssh.me.uk/moddoc/Description :

Quote
Description.OLFont/Width/Color

Specify the properties of the Overlay used in Overlay mode. For GUIs, they are picked up from the GUI settings


Gribbler

  • Posts: 1,489
  • I'm selling these fine leather jackets.
    • Gribbler worked on a game that was nominated for an AGS Award!
      Gribbler worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #38 on: 13 Sep 2008, 22:49 »
Well, yes I found that page and that particular piece of info but still I don't know where to put it and what numbers to use:) Im sorry, Im rather new to scripting. Now Im thinking maybe I should ask the question in the beginners section:)

SSH

  • Posts: 5,710
  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #39 on: 14 Sep 2008, 09:16 »
Put Description.OLFont=2; in your global script game_start function. Or change 2 to the font number that you want.