Hotspot name change in Look-At function

Started by tobulos1, Thu 09/04/2015 15:53:06

Previous topic - Next topic

tobulos1

Hi guys! It's me, again :P

I tried to search the forums for this one, thinking it might be a common question, but I couldn't find anything. Either way:

If I want to change a hotspot name in the middle of a Look-At function, how would one do that? E.g. let's say we have a hotspot named "Flowers" then when I use "Look-At" at it, the character will speak some lines and after he's finished, the hotspot will be named "Beautiful flowers".

P.S. Using the Verb-9 template :)

EDIT: One more thing, whenever I'm trying to walk on an area that's covered by the GUI gAction, my character simply won't walk over it. I've tried mixing with the properties, e.g. setting the clickable area false, etc, like this picture.
How can I make my character walk over the GUI gAction? As of now, it seems as the GUI is functioning like a block or a wall that prevents me from moving my character there.

Haggis

Sadly I do not believe it's possible at present to change the name of a hotspot - you could use an object instead though.

From the AGS Help:

QuoteName property (hotspot)
(Formerly known as GetHotspotName, which is now obsolete)
(Formerly known as Hotspot.GetName, which is now obsolete)

readonly String Hotspot.Name;

Gets the name of the hotspot.
This property is read-only; it is currently not possible to change hotspot names at run-time.

Example:

Display("Hotspot 3's name is %s.", hotspot[3].Name);

will retrieve and then display hotspot 3's name.
See Also: Game.GetLocationName

Re: Walkable GUI - unfortunately this is outside of my knowledge zone but I did find this thread - http://www.adventuregamestudio.co.uk/forums/index.php?topic=25582.msg322490#msg322490
Not sure if it's helpful, maybe someone else will have had the same issue.


tobulos1

Thanks for the links guys, but I couldn't get it to work. I suppose I'll have to make peace with myself and hope that they add it in the next release :)

As for the GUI problem; still not fixed, have been looking everywhere for answers, any advice?

Slasher

#4
if you made 2 flowers as objects, 1 visible and one invisible, then when you look at the visible flower you would make it invisible and the invisible flower visible. both flowers would have their own description.

make invisible flowers clickable=false until visible.

food for thought.

afaik: GUI's are drawn above everything else.


tobulos1

Quote from: slasher on Fri 10/04/2015 15:54:16
if you made 2 flowers as objects, 1 visible and one invisible, then when you look at the visible flower you would make it invisible and the invisible flower visible. both flowers would have their own description.

make invisible flowers clickable=false until visible.

food for thought.

afaik: GUI's are drawn above everything else.

Hm, I'll try to make objects out of it. If it still doesn't work, nvm :P

Although, the GUI should be clickable, right? So you can turn it off, and then I should be able to actually walk my character to where the text says "Walk to", "Pick up <object>", etc, isn't that so?

Haggis

Re: Flowers - objects is the way to go. They are your friend.

Re: GUI - Now this is on the limits of my skills so hopefully someone else can help - but the link I found was saying that you'd need to catch the click on the the GUI interface and process it correctly. As Slasher says i think the GUI sits on top of everything and blocks normal clicks (if it's visible) so I think, no promises, that you need to open the GUI pane and set > EVENTS > ON CLICK.

Then in the 'on click' function force the GUI on click to do the relevant action depending on the current mouse setting e.g. eModeWalkto;

Here was the advice from the other thread:
QuoteYou can also give GUIs their own control functions (like you can the individual Buttons, etc), which are called when the mouse is clicked on the GUI, but not on any Control.
That might be easier than messing about with interface_click and GUIControl.GetAtScreenXY(..).

I'm not sure if you'd have to repeat this in the 'on click' event code for any buttons, overlays etc on the GUI.

Hopefully someone more knowledgeable will be able to assist.

SMF spam blocked by CleanTalk