Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Random Name and Random Events

I have an idea for a project where I have two random things, three random characters who are generated with random names and genders, three people who will open a series of doors which will choose one of several pre-made events randomly. Example Person 1 in one game may be a male named Mark, but next play may be a female named Kristen. Also a series of numbered doors, Door 9 in one game may spray acid, but next game shoot a spear at you. Any clues what is the best way to tackle this or where to find relevant info?

Comments

  • You need to state which Story Format you are using when you ask a question, as answers can be different for each one.
  • If it's Harlowe, use the (either:) macro.
    (either: "Mark","Kristen")
    

    You can do this as much as you like, not just twice, but you have to put the commas in between.
  • greyelf wrote: »
    You need to state which Story Format you are using when you ask a question, as answers can be different for each one.

    Currently using Harlowe but open to try other formats if it does not provide what I wish.
  • greyelf wrote: »
    You need to state which Story Format you are using when you ask a question, as answers can be different for each one.

    Currently using Harlowe but open to try other formats if it does not provide what I wish.

    If you are using Harlowe, then yeah, like I said before. So if you want a variable which is the name for a person, and that name could have five different possibilities for example, you would put this:
    (set: $name to "(either: 'Mark','Kristen','Will','Mia','Lazaravic')")
    
  • Deadshot wrote: »
    (set: $name to "(either: 'Mark','Kristen','Will','Mia','Lazaravic')")
    
    Remove the double quotes:
    (set: $name to (either: 'Mark', 'Kristen', 'Will', 'Mia', 'Lazaravic'))
    
  • Oh. I though that you needed them, seeing as if you wanted to set a variable to custom text, that had to be in double quotes:
    (set: $name to "Mark")
    

    Or can you do this:
    (set: $name to Mark)
    
  • edited August 2016
    Deadshot wrote: »
    Oh. I though that you needed them, seeing as if you wanted to set a variable to custom text, that had to be in double quotes:
    If you are setting a variable to a String literal* like "Mark" then you do need the quotes:
    (set: $var to ""String literal")
    
    ... but when in the case of (either: 'Mark','Kristen','Will','Mia','Lazaravic') each of the individual String literals being passed to the (either:) macro are already quoted so you don't need to quote the macro itself or its return value.
    (set: $var to (either: "String literal 1", "String literal 2", "String literal 3"))
    
    * A String literal is a text value that is wrapped in quotes. eg. "Mark"
Sign In or Register to comment.