Two questions! Flags and Adult material.
Soebek110
23 Aug 2011, 14:24First, thanks for doing such an amazing job with Quest. I've always wanted to find a text adventure program I could use since I can't program for toffee, and this one is just fantastic. Now, my questions.
1) Is there a way I can use the conditional case script function with flags? In the tutorial it bases it on a player entering a telephone number. I currently have my npcs acting different and offering different speech menus depending on how far the player is through certain quests (for which I set and unset flags appropriately). This works well, but it does mean that I have to embed if function after if function. As I add more quests (and thus more flags) this gets increasingly convoluted and time-consuming.
I have tried simply having more than one if script without embedding, but this tends to cause those scripts to overlap and I find that it means I cannot have a "default" response if no flags are set (ie, if the character is not involved in any active quests), as that default response then gets said by the character as well as any flag-appropriate speech.
Any ideas would be appreciated, because the length of some of these if functions (and the numbers of windows I need to click through to get to the most recent) will start to drive me mad!
2) The story I am working on is very explicit. Would it still be suitable for upload to textadventures.co.uk when I'm done, or would it be best off kept privately? I see there is an adult section already on the website with some very explicit work displayed, but I simply want to make sure. Just to make it clear, when I say explicit I mean in terms of the language used and the graphic nature of the game - I don't mean I'm descibing anything illegal. All the, um, adult material in the game is consensual and legal between partners!
Thanks for the help.
1) Is there a way I can use the conditional case script function with flags? In the tutorial it bases it on a player entering a telephone number. I currently have my npcs acting different and offering different speech menus depending on how far the player is through certain quests (for which I set and unset flags appropriately). This works well, but it does mean that I have to embed if function after if function. As I add more quests (and thus more flags) this gets increasingly convoluted and time-consuming.
I have tried simply having more than one if script without embedding, but this tends to cause those scripts to overlap and I find that it means I cannot have a "default" response if no flags are set (ie, if the character is not involved in any active quests), as that default response then gets said by the character as well as any flag-appropriate speech.
Any ideas would be appreciated, because the length of some of these if functions (and the numbers of windows I need to click through to get to the most recent) will start to drive me mad!
2) The story I am working on is very explicit. Would it still be suitable for upload to textadventures.co.uk when I'm done, or would it be best off kept privately? I see there is an adult section already on the website with some very explicit work displayed, but I simply want to make sure. Just to make it clear, when I say explicit I mean in terms of the language used and the graphic nature of the game - I don't mean I'm descibing anything illegal. All the, um, adult material in the game is consensual and legal between partners!
Thanks for the help.
Alex
23 Aug 2011, 14:29If your game is linear then maybe you could use a numeric variable instead of a flag. Then you would have %stage% being 1, 2, 3... which would be easier to put in a "select case".
Alternatively, with your multiple "if"s, you could create a temporary "ishandled" numeric variable - set it to zero before running through your "if" flag checks. In each "then" script, set it to 1. If it's still 0 at the end, you know the response hasn't been handled yet, so you can print a default.
Adult content is OK on textadventures.co.uk but obviously nothing illegal is allowed. I have the final say so I reserve the right to delete a game, but I am generally pretty lenient. Just be sure to mark clearly that there's adult content in the game so it gets put in the correct category.
Alternatively, with your multiple "if"s, you could create a temporary "ishandled" numeric variable - set it to zero before running through your "if" flag checks. In each "then" script, set it to 1. If it's still 0 at the end, you know the response hasn't been handled yet, so you can print a default.
Adult content is OK on textadventures.co.uk but obviously nothing illegal is allowed. I have the final say so I reserve the right to delete a game, but I am generally pretty lenient. Just be sure to mark clearly that there's adult content in the game so it gets put in the correct category.
Soebek110
23 Aug 2011, 14:50It's not particularly linear, hence my use of extensive flagging, but your suggestion has worked a treat! Just tested it now with one npc and it's functioning perfectly. Means I can just add another "if" script when I need to add another menu, rather than trawling through all the "else" boxes to reach the last one!
Thanks!
Thanks!