Labelling Help*FIXED*

Started by Melee Island Resident, Tue 19/04/2011 22:58:06

Previous topic - Next topic

Melee Island Resident

In order to label different hotspots i used this code:
Code: ags
function hGate_MouseMove()
{
Display("Name of Hotspot");
}


This was quite clunky and made it hard to look at or interact with hotspots, so, is there an easier way to label scenery and other things, perhaps how it was done in MI?

I'm sure there's a really easy solution for this but does anyone have any suggestions?

amanta4ray

#1
The easiest way to do this would be to create a gui and add a label to it.  In the text of the label add @OVERHOTSPOT@. This will put text over every hotspot, character and object in the game. 

Make sure to set your gui color to 0 and border color to 0 (this will make it invisible, but the words will still show on the label.)

          Hope this helps.... :)

Works wonders for me!!

monkey0506

You can also check out the Description module or the Game.GetLocationName function (this last one specifically in conjunction with repeatedly_execute). There's various ways to accomplish this, depending on what exactly you want. ;)

barefoot

Hi

I think using a label with @OVERHOTSPOT@ can be much more useful than Mouse over in most cases.. as long as it has a basic description..

:=

barefoot
I May Not Be Perfect but I Have A Big Heart ..

Melee Island Resident

Quote from: amanta4ray on Tue 19/04/2011 23:51:39
The easiest way to do this would be to create a gui and add a label to it.  In the text of the label add @OVERHOTSPOT@. This will put text over every hotspot, character and object in the game. 

Make sure to set your gui color to 0 and border color to 0 (this will make it invisible, but the words will still show on the label.)

          Hope this helps.... :)

Works wonders for me!!
how do i put the GUI into effect?

barefoot

#5
Quote from: Melee Island Resident on Wed 20/04/2011 17:08:16
Quote from: amanta4ray on Tue 19/04/2011 23:51:39
The easiest way to do this would be to create a gui and add a label to it.  In the text of the label add @OVERHOTSPOT@. This will put text over every hotspot, character and object in the game.  

Make sure to set your gui color to 0 and border color to 0 (this will make it invisible, but the words will still show on the label.)

          Hope this helps.... :)

Works wonders for me!!
how do i put the GUI into effect?

Open up a Gui from the Gui tree on the right... (Choose the Gui you want to add label to).
Add Gui Label (icon at the top of window - has mouse over descriptions) and add to the Gui (drag and size).
On the Label Property's panel type: @OVERHOTSPOT@ where it says Text..  (Include the @.)

Make sure each Hotspot/Object has a descriptive term in it's property'e panel.

Check out 'Labels' in the manual's index.

Hopefully this will help you..

barefoot


I May Not Be Perfect but I Have A Big Heart ..

Melee Island Resident

im pretty sure i did all that but it's not working

what do i put in the properties?

Khris

"not working" doesn't help us.

Is the GUI/label visible? Did you set the GUI to "Normally, on"?
Did you use a label, not a button/textfield?

We need to know what you did and what did or didn't happen during testing.

Melee Island Resident

i put it as visible and normally on
and i made sure it was a label
and when i tested it it did nothing different

barefoot

#9
Hi

i am in the process of labelling as we speak..  Apart from making the Gui being visible I also added Label8.Enabled=true; in room where you want it to start in, use before room fade in (amend Label8 to your Label name.)

If it still fails to show I suggest you go over the manual. especially about GUI's and Labels in this inst.. and check posts on these forums..

barefoot
I May Not Be Perfect but I Have A Big Heart ..

Melee Island Resident

im really confused by this

Sephiroth

#11
This is pretty simple, when you look at the property panel on the right for your Label, you can set the "Text" field to "@OVERHOTSPOT@" without the quotes, now set the "Description" field of your hotspots/scenery to whatever you want to display when the mouse is over it. Or did I miss something, maybe you wanted to do something different or more advanced?

Khris

If you set the GUI's border color to e.g. 15 (white) does it appear at all?
If you change the label text to "Test" does that appear?

And yes, make sure you put something into the Description fields of the hotspots/objects, otherwise it's obviously gonna stay blank/empty/invisible.

Melee Island Resident

i have description on almost every hotspot but nothing shows

barefoot

#14
1: Check the font colour for the label text is not same colour as GUI.

2: Check label is enabled visible.

3: Hold mouse over Hotspot/object in room, does it show any text at all for the label?

4: Are you sure you entered  @OVERHOTSPOT@ (exactly) where it says Text in the labels events panel on the right?

If you still can't get the label to show you should spend some time reading the manual about Labels and GUI's.

Once you get an idea how things work it does get easier.. though not always simple and questions will always arise.

Khris and Sephiroth  have also explained to you about this.


barefoot







I May Not Be Perfect but I Have A Big Heart ..

Melee Island Resident

agh i wrote over hostspot
sorry guys it works fine now

thanks for your patience you guys really rule

Khris

If you misspell the token you see the actual text i.e. your label should've said "@OVERHOSTSPOT@".

Why did you tell us that you didn't see anything then...?
We could have solved this quickly and easily.

Melee Island Resident

but i didn't see @hostspot@ i would've told you if i did

i did change a few other things around like i had the text as grey and the background as black ::) so maybe i just wasn't looking hard enough

anyway thanks for your help

SMF spam blocked by CleanTalk