Change the choice

I've been working on my interactive story that have choices. I don't know how to make like Telltale Games, such as Minecraft Story Mode, The Walking Dead, etc. I was wondering... how do I do a choice that requires something to unlock it? For example: When my character wanted to get out of his room, but need to wear his clothes first. After that, you have access to get out of the room. Please help!!

(filler for getting my edited post, updated/posted)

you need an indicator/flag (an Attribute VARIABLE), and then you can use the 'if' Function/Script, and I'm not sure how you want your interactions/events/etc done, but one way is using the built-in Verbs/buttons, which Pixie explains how they're controlled (via the built-in 'displayverbs' and/or 'inventoryverbs' Stringlist Attributes), here:

for a quick pseudo example (using an Integer Attribute for an example, but you can use Boolean Attributes, String Attributes, List/Dictionary Attributes, or whatever other Attribute Type):

// initial setting: game.state = 0

// events/etc happen during game play that change the 'game.state' Integer Attribute, ie: game.state = 1, game.state = 2, etc

// whatever other event or whatever in your game that depends upon the indicator/flag:

if (game.state = 0) {
  list add (example_object.displayverbs, "princess")
} else if (game.state = 1) {
  list add (example_object.displayverbs, "dragon")
} else if (game.state = 2) {
  list add (example_object.displayverbs, "sword")
} else if (game.state = 3) {
  list add (example_object.displayverbs, "wizard")

that's the basic concept ... though you'll need to apply it for getting out of a room:

for pseudo example, have the Exit/Door as being locked (NAME_OF_EXIT_OR_DOOR.locked = true), and for its scripting:

if (ListContains (ScopeInventory (), "skeleton_key")) {
  // scripting to unlock/open/go-to-next-room
} else {
  msg ("The door/exit can only be opened/unlocked via the skeleton key")

there's guides/help with Exits/Doors/opening/closing/locking/unlocking... if you need help finding them, let me know... and I hopefully can find them for you, lol.

also, others can help you fully on this matter... I've not worked with this built-in stuff for awhile, so I'm very rusty with it... and thus my posts aren't of much direct help, as they're just the concepts involved.

Thanks for helping! I hope that I know how to do this...

here's some links, if you want to try to learn how to code with quest: (quest's coding and code structure) (scripting basics: Attributes and the 'if' Script usage, which enables 90% of everything you want to do for/within your game!)

more advanced scripting: (List and Dictionary Attribute usage: enables +5%, so 90% + 5% = 95%, of everything that you want to do for/within your game)

help/guides/libraries specifically on doors/exits/opening/closing/locking/unlocking: (navigate it: you hopefully should be able to find help on doors/exits/etc)

let me know if you still need help

Log in to post a reply.