Changing options when using "ask" and "if" in TA
georgiebhughes
25 Aug 2019, 22:14Hi! New to making games and wondering if there is a way to change what appears when you use the "ask" and "if" functions? Currently when I ask a question and give the player 2 options yes and no, they are labelled as
1. Yes
2. No
and I just want to change it to say
yes
no
so that it flows with the design of the rest of my game.
Thanks!
mrangel
26 Aug 2019, 01:58If you're using the desktop version of Quest, you need to edit the function ShowMenu
. Find the line:
msg (count + ": <a class=\"cmdlink\" style=\"" + style + "\" onclick=\"ASLEvent('ShowMenuResponse','" + EscapeQuotes(optiontag) + "')\">" + optionText + "</a>")
and change it to
msg ("<a class=\"cmdlink\" style=\"" + style + "\" onclick=\"ASLEvent('ShowMenuResponse','" + EscapeQuotes(optiontag) + "')\">" + optionText + "</a>")
If you're on the web version, or if you'd rather not change all menus, you can generate a menu manually by doing something like:
game.menuoutputsection = StartNewOutputSection()
msg ("Insert your question here")
msg ("<a class=\"cmdlink\" style=\"" + GetCurrentLinkTextFormat() + "\" onclick=\"ASLEvent('ShowMenuResponse','yes')\">yes</a>")
msg ("<a class=\"cmdlink\" style=\"" + GetCurrentLinkTextFormat() + "\" onclick=\"ASLEvent('ShowMenuResponse','no')\">no</a>")
EndOutputSection (game.menuoutputsection)
game.menuoptions = Split ("yes;no")
game.menuallowcancel = false
game.menucallback => {
if (result = "yes") {
// do something here
}
else {
// do something else here
}
}