I have a simple script question because I cannot access the game files where I've used this code before.
I have a slider called "count" and I have a label called "displaycount" that I want to display the number the slider is currently at, ie 1 to 100. I think it has something to do with calling StrFormat but I really don't understand what the help guide is telling me.
Can someone please post me the code?
Many thanks :)
displaycount.Text = String.Format("%d", count.Value);
Well, that was stupidly easy - thanks Khris!
I'm sure this post'll be updated with fresh questions pretty soon :)
You're welcome :)
Cool! Well I have another question, hopefully simple!
I have 2 GUIs. GUI 1 has a label text in it which changes over various hotspots, simple. GUI 2 has a button in it that when I move the mouse over it I want the label text in GUI 1 to display it.
However there doesn't seem to be a simple "is mouse over button" command, can it be replicated somehow? Obviously it's not about changing the mouseover graphic, but simply some way of AGS recognising my mouse being over the button.
Any help appreciated :)
Something like this should do the trick:
// inside repeatedly_execute
GUIControl*gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (gc == button_name_here) label.Text = "button";
else label.Text = "@OVERHOTSPOT@";
Perfect, thanks! :)