Hyperlinks not showing verbs when clicked (SOLVED)

kurto321
01 Sept 2018, 17:21

In the game i'm making, I'm only using hyperlinks for player navigation. I've quickly run into another roadblock - in one specific room, the object hyperlinks generated upon entering the room don't show the verbs associated with the objects when clicked. However, when I use FormatObjectList via a script on an inventory item, the newer hyperlinks generated do show the verbs when clicked. Is there anything in particular that would cause this? I can give more information if needed. Thanks!

Edit: It seems that performing any interaction using an inventory item makes the hyperlinks show their verbs when clicked...I'm quite perplexed...


mrangel
01 Sept 2018, 17:56

Are you using a turnscript or a TurnTimeout to move the player into this room?

By default, all hyperlinks are sent to the browser as "blank" hyperlinks that don't do anything.
Then, at the end of every turn a function UpdateObjectLinks sends out a list of the current displayverbs for every object reachable. Links to those objects are modified to have the correct menu loaded, and all other object links are disabled. (This is so that the player can't scroll back to the previous room and click on objects there)

If an object has a link, but clicking the link doesn't make a menu appear, that sounds to me like the links are being generated after UpdateObjectLinks is run, meaning that the menu doesn't work properly until next turn.

I can't find anywhere this could happen; I'm not entirely sure about the order things are processed in the latest version. But it might be worth putting UpdateObjectLinks() in the room's enter script (after the links are displayed) to see if that helps.


kurto321
01 Sept 2018, 18:01

Thanks, I'll try it! The only thing I can think of that could make the hyperlinks appear after something else is a few instances of 'run script after x seconds' that I'm using.


kurto321
01 Sept 2018, 18:05

It seems to have worked! Many thanks!