[solved] How to highlight an Exit?
Curt A. P.
14 Nov 2019, 21:44I try to print a highlighted Exit which the player can click on, just in the auto-generated room description. So when the player clicks on it, he gets moved right away.
These things work with normal objects and it returns a highlighted link, but not with exits:
GetDisplayNameLink ()
GetDisplayAlias ()
{object:" + object.name + "}
With exits, they get printed correctly but aren't highlighted...
mrangel
14 Nov 2019, 22:06In a script:
somevariable = GetDisplayNameLink (exit27, "exit")
Or in text:
{exit:exit27}
(substituting the actual name of your exit for exit27, of course)
Curt A. P.
14 Nov 2019, 22:57Thanks, I haven't seen that the text processor have this option.
foreach (ex, ScopeExits()) {
msg ("{object:" + ex.name + "}")
}
This works fine. Using the name attribute because of a variable.
mrangel
14 Nov 2019, 23:48If you're making a list, you could also do:
msg (Replace (FormatExitList ("", ScopeExits(), ",", ""), ",", "<br/>"))
(The function used by Quest's default "You can go" list, but replacing the commas with newlines)
Curt A. P.
15 Nov 2019, 12:10Okay, not sure what the Replace function is, though I looked it up.
I have it like a ''Paths:'' pane with exits, doors and other moving methods are listed together if reachable.