Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: static on Sat 30/08/2003 14:23:54

Title: Help! Name lenght.
Post by: static on Sat 30/08/2003 14:23:54

In this screen you have a lot of "thingys" displayed in 1st
person view. At the top of the screen name of the objects
(thingys) are displayed. But, the name cannot fit.

Is there a way to exceed the limit?

SSH, you've said I can use the properties to do this. How?


Title: Re:Help! Name lenght.
Post by: Scummbuddy on Sun 31/08/2003 15:58:25
Nothing I can think of can really help you, but if you believe that SuperScottishHero can, private message the lad, and give that a go.
Title: Re:Help! Name lenght.
Post by: SSH on Mon 01/09/2003 12:12:10
SO that all can benefit, I'll put the response here:

OK, assuming that static is ocrrect about there being a 30-char-or-so limit on hotspot names, we can use the new properties feature of AGS 2.56 to worka round this.

First, you need to set up a string property on all your hotspots with the name you want to display. Secondly, you can no-longer use the @OVERHOTSPOT@ text in your dialog. You need to script things up with:

1. Get the GUI number and object number of your textbox where you want the info to appear
2. Add this into your repeatedly_execute:
SetTextBoxText(guino, objno,  GetHotspotPropertyText(GetHotspotAt(mouse.x,mouse.y)));
3. If you want this to work with objects and characters too, you'll need somehting like this, substituting GetHotspot with GetCharcter/Object, etc.

if (GetLocationType(mouse.x,mouse.y)==1) {
 // hotspot
} else if (GetLocationType(mouse.x,mouse.y)==2) {
 // character
} else if (GetLocationType(mouse.x,mouse.y)==3) {
// object
}

Hope this helps!