hotspot name

Started by kantor_98, Tue 19/07/2005 10:02:49

Previous topic - Next topic

kantor_98

OK. Thank you for all those who answer me.
I still have a small problem with hotspoot name. I use @OVERHOTSPOT@ but I was able only to put it in the GUI. how can I put it on a ladel text, so that it appears near to the cursor ? I think is much better when the name of the hotspot, character, object appear close to him, when I put the cursor on him. Can you help me  with some hints ?
Thank you !

Gilbert

Well there're lots of way to do similar effect, a common one is to use a text overlay, but if you don't want to mess with overlay codes, one easy way is to make a GUI with transparent background (set to colour 0) and only one label on it, which is set to "@OVERHOTSPOT@".

All you need is to constantly move the GUI so it's near your cursor. Just put the follow code in the repeatedly_execute ('always' if you want it to be updated also during blocking function) () function of the global script (for V2.62 or earlier):

SetGUIPosition(5, mouse.x, mouse.y);

(Say, the GUI is #5, you can fine tune the code, like using mouse.x+5, mouse.y+3, etc. if you want to align the text depending on your needs).
If you're using V2.7+, the code should be something like below instead:

gHottext.X=mouse.x;
gHottext.Y=mouse.y;

guybrush

SPY FUNCTION-- My first game
C O M I N G   S O O N !

SMF spam blocked by CleanTalk