Questions and further

My goal is to create a small, simple game with images for my friends to help tie-up a storyline we've done in tabletop roleplay (though I obviously am not expecting the sort of flexibility that comes with freeform gaming!) Game-wise, I'm trying to keep it very rudimentary, the sort of hand-holdy click-through gameplay you get from those generic hidden object games (but without the hidden object segments- no interest in that.)

I've got the story, I've got the images, but I have no head for coding at all. I jumped at Quest because of the gui options, but even with that I keep finding myself totally lost on what seem to be truly basic tasks. It took me the better part of a day off and on to set up the first room and get an item to use the "open" picture when you looked at it and it was open and the "close" picture when it was closed, and I somehow managed to crash the program twice while during (definitely assume my incompetence there, not quest's). Now I'm trying something else that seems basic: you're in the next room -> you see a figure -> when you look further at the figure you notice a box in its lap -> you look into the box. But I can't figure out nesting the items at all, if nesting is even a thing. Is it just a matter of toggling visibility/invisibility and writing around it? And while I'm asking, how can I make the answer in the "ask" command (the yes/no one, not the separate tab) influence anything? What do I need to follow up with?

Further than that, there's just a lot a questions I've got and problems I've run into that I feel like could be solved with a quick question and a quick answer but I'm instead dragging out into combing over the tutorial and feeling the absolute gaps where any coding mindset should be. If anyone experienced has discord and wouldn't mind me dropping in to clarify something-or-other along the way, I'd greatly appreciate it!


unfortunately, even with the GUI/Editor, you still got to have some coding, and its logic too, knowledge/understanding, this is just the way that game-making is, even with the best GUI/Editor of all time (and Quest has a really good one, quest is a really powerful and well-done system/program), you still got to know some coding and its logic.

I'll let others handle your Object nesting and presumably add/remove Verb displayment and/or toggling the built-in 'visible' and/or 'scenery' Boolean Attributes, for what I think you want to do, not too clear/sure, on what you want exactly.


coding uses algebra: storing Values WITHIN VARIABLES

MATH: ALGEBRA:

x = 8

x + 3 = n
[ x = 8 ] + 3 = n
[ 8 ] + 3 = 11
n = 11


Programming:

Assignment Operation: stores the final (calculated/completed) Value on the right side of the equal sign (Assignment Operator) WITHIN the VARIABLE on the left side of the equal sign (Assignment Operator)

examples:

x = 10 // the final Value of '10' is stored within the 'x' Variable VARIABLE
x = 5 + 5 + 5 // the final Value of '15' is stored within the 'x' Variable VARIABLE
x = "mama" // the final Value of 'mama' is stored within the 'x' Variable VARIABLE
x = "mama" + "mia" // the final Value of 'mamamia' is stored within the 'x' Variable VARIABLES

x = 0
x = x + 5
// x = 5
x = x + 5
// x = 10
x = x + 5
// x = 15
x = x + 5
// x = 20


as programming (using Variable VARIABLES):

x = 8 // programming (unfortunately, not taught in math classes): the Assignment Operation: the '8' Integer Value on the right side of the equal sign (Assignment Operator) is stored WITHIN the 'x' Variable VARIABLE on the left side of the equal sign (Assignment Operator)

IMPORTANT: the VARIABLE MUST be on the LEFT SIDE of the equal sign (Assignment Operator), and the VALUE OR EXPRESSION, MUST be on the RIGHT SIDE of the equal sign (Assignment Operator): 8 = x ----> ERROR!

n = x + 3
// n = [ x = 8 ] + 3
// n = [ 8 ] + 3
// n = 11 // programming (unfortunately, not taught in math classes): the Assignment Operation: the final (calculated/completed) '11' Integer Value on the right side of the equal sign (Assignment Operator) is stored WITHIN the 'n' Variable VARIABLE on the left side of the equal sign (Assignment Operator)
msg (n)
// output/displayment:
// 11

Programming (using Attribute VARIABLES):

create ("example_object")
example_object.x = 8 // programming: the Assignment Operation: the '8' Integer Value on the right side of the equal sign (Assignment Operator) is stored WITHIN the 'example_object.x' Attribute VARIABLE on the left side of the equal sign (Assignment Operator)

example_object.n = example_object.x + 3
// example_object.n = [ example_object.x = 8 ] + 3
// example_object.n = [ 8 ] + 3
// example_object.n = 11 // programming: the Assignment Operation: the final (calculated/completed) Value of '11' on the right side of the equal sign (Assigment Operator) is stored WITHIN the 'example_object.n' Attribute VARIABLE on the left side of the equal sign (Assignment Operator)
msg (example_object.n)
// output/displayment:
// 11

Programming can use NON-amount (Strings, Booleans, Object references/points, Lists, Dictionaries, Scripts, etc) Values too (whereas Math just uses amount Values: Integers and Doubles/Floats/Floating-Points/Decimals/Fractionals):

String Values example:

// Concatenation Operation: literally putting together / next-to-each-other, two strings

x = "mama"
y = "mia"
z = x + y
// z = "mamamia"
msg (z)
// output/displayment:
// mamamia

Math (Arithmetic: Addition) vs Concatenation:

Math (Arithmetic: Addition):

5 + 5 = 10
55 + 55 = 110

Concatenation:

"5" + "5" = "55"
"55" + "55" = "5555"

"mama" + "mia" = "mamamia"

"mama" + "5" = "mama5"

"5" + "mama" = "5mama" // however, usually this causes an error, as it's very bad to have the names of things, starting with a number character, as strings often are used for the names of things

"mama" + "5" + "mia" = "mama5mia"

// the '[SPACE/WHITE-SPACE]' is a character, just like 'a', '1', and '&' are characters:

"mama" + " " + "mia" = "mama mia" // just if you can't see the SPACE (not actual/working code): "mama" + "[SPACE]" + "mia"

"mama " + "mia" = "mama mia" // just if you can't see the SPACE (not actual/working code): "mama[SPACE]" + "mia"

"mama" + " mia" = "mama mia" // just if you can't see the SPACE (not actual/working code): "mama" + "[SPACE]mia"


how the built-in 'ask/Ask' Script/Function works:

it's a bit misleading, as it's a 'yes/no' type of questioning, it's NOT for a normal (open-ended) question, for those, you'd use the built-in 'show menu / ShowMenu' Script/Functions and/or the built-in 'get input' Script/Function.

in code, example:

ask ("Do you want to end the game?") {

  // for the user playing the game: the menu choices/options, selecting one of them:
  //
  // yes
  // no

  // quest automatically (hidden from you), converts your choice/selection (yes/no) to its boolean equivalent (true/false), like so:
  //
  // yes -> true
  // no -> false

  // quest automatically (hidden from you), sets: result = YOUR_SELECTED_CHOICE/OPTION
  //
  // so, either:
  //
  // result = true
  // or
  // result = false

  // we then need the 'if' Script/Function (or we can also use the 'switch' Script/Function instead), to handle the conditional:

  if (result) {
    // the above is the shortened form of this, and how it works too:
    // if (result = true) {
    // if ( [ result = true ] = true) {
    // if (true = true) {
    // indeed, true = true ---> TRUE
    // if (TRUE) {
    // thus, do the nested two 'msg' and 'finish' scripts below (and SKIP the 'else' test):

    msg ("You chose to end the game")
    msg ("Ending the game now...")

    finish // this 'finish' Script/Function call, ends the game

  } else {
    // the above is the shortened form of this, and how it works too:
    // else if (result = false) {
    // else if ( [ result = false ] = false) {
   // else if (false = false) {
   // indeed, false = false ---> TRUE
   // else if (TRUE) {
   // thus, do the nested single 'msg' script below

   msg ("You chose NOT to end the game")
  
}

---------

further explanation of how it works:

result = true

if (result) {
    // if ( [ result = true ] = true)
   // if ( [true] = true)
  // TRUE, so do the 'msg ("1")' script nested below (and skip the 'else' test):
  msg ("1")
} else {
  msg ("2")
}

result = false

if (result) {
    // if ( [ result = false ] = true)
   // if ( [false] = true)
  // FALSE, so jump to the 'else' below (SKIP the nested 'msg ("1")' script below)
  msg ("1")
} else {
   // if ( [ result = false ] = false)
  // if ( [false] = false)
  // TRUE, so do the 'msg ("2")' script nested below:
  msg ("2")
}

String Matching, how it works underneath:

x = "dragon"

if (x = "dragon") {
  msg ("MATCH")
} else {
  msg ("NOT match")
}

// if ( [ x = "dragon" ] = "dragon")
// if ( [ "dragon" ] = "dragon")
// if ( [ "d" ] = "d") // match success
// if ( [ "r" ] = "r") // match success
// if ( [ "a" ] = "a") // match success
// if ( [ "g" ] = "g") // match success
// if ( [ "o" ] = "o") // match success
// if ( [ "n" ] = "n") // match success
// indeed, [ "dragon" ] = "dragon"

-------------

important: quest IS upper-lower case sensitive!

---------

x = "dragoN"

if (x = "dragon") {
  msg ("MATCH")
} else {
  msg ("NOT match")
}

// if ( [ x = "dragoN" ] = "dragon")
// if ( [ "dragoN" ] = "dragon")
// if ( [ "d" ] = "d") // match success
// if ( [ "r" ] = "r") // match success
// if ( [ "a" ] = "a") // match success
// if ( [ "g" ] = "g") // match success
// if ( [ "o" ] = "o") // match success
// if ( [ "N" ] = "n") // match FAIL
// FAIL, [ "dragoN" ]  is not equal to "dragon"

------------

x = "dragon"

if (x = "dragoN") {
  msg ("MATCH")
} else {
  msg ("NOT match")
}

// if ( [ x = "dragon" ] = "dragoN")
// if ( [ "dragon" ] = "dragoN")
// if ( [ "d" ] = "d") // match success
// if ( [ "r" ] = "r") // match success
// if ( [ "a" ] = "a") // match success
// if ( [ "g" ] = "g") // match success
// if ( [ "o" ] = "o") // match success
// if ( [ "n" ] = "N") // match FAIL
// FAIL, [ "dragon" ]  is not equal to "dragoN"

// 'AND' Logic:

msg ("if you do both: cleaning your room and mowing the lawn, then and only then, do you get five dollars")

player.currency = 0

if (room_cleaned and mowed_lawn) {
  player.currency = player.currency + 5
  msg ("You cleaned your room and mowed the lawn, so, you get 5 dollars")
} else if (room_cleaned) {
  msg ("You cleaned your room but you didn't mow the lawn, so, you do NOT get five dollars")
} else if (mowed_lawn) {
  msg ("You mowed the lawn but you didn't clean the room, so, you do NOT get five dollars")
} else {
  msg ("You didn't clean your room, nor did you mow the lawn, so, you do NOT get five dollars")
}

----------

// 'OR' Logic:

msg ("if you either: clean your room or mow the lawn or do both: cleaning your room and mowing the lawn, then you get five dollars")

player.currency = 0

if (room_cleaned or mowed_lawn) {
  player.currency = player.currency + 5
  if (room_cleaned and mowed_lawn) {
    msg ("You cleaned your room and mowed the lawn, you get five dollars")
  } else if (room_cleaned) {
    msg ("You cleaned your room, but you didn't mow the lawn, you get five dollars")
  } else {
    msg ("You mowed the lawn, but you didn't clean your room, you get five dollars")
  }
} else {
  msg ("You didn't clean your room, nor did you mow the lawn, so, you do NOT get five dollars")
}


Boolean Logic / Truth Tables:

Definition Logic:

true -> TRUE
false -> FALSE

Negation ('NOT') Logic:

not true -> FALSE
not false -> TRUE

'AND' (conjunction) Logic:

true and true -> TRUE
true and false -> FALSE
false and true -> FALSE
false and false -> FALSE

'OR' (disjunction) Logic:

true or true -> TRUE
true or false -> TRUE
false or true -> TRUE
false or false -> FALSE


What I recommend is, don't skip any part of the beginner's tutorial if you are just starting out, it's there for a reason. The other tutorials, you can pick and choose as you please.

Other than that, experimenting with other eople's codes and libraries is the best way to learn.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums