List or Array Variable

Discussion in 'Suggestions' started by RejectTed, May 3, 2022.

  1. RejectTed

    RejectTed Really Experienced

    Basically, I think it'd be handy to have a way to have a list in game mode for things like inventory, or people fucked. The items in the list are short strings that can include letters numbers or some punctuation. The conditional brancher and if statements would focus on weather or not a list has an item {if places != docks} You haven't been to the docks.{endif} or the total number of items in the list {if harem@ = 0} You're a virgin.{endif}.

    Authors can add items, remove items (if they're in the list), or clear the whole list.
     
  2. insertnamehere

    insertnamehere Really Really Experienced

    This can be achieved with a boolean variable for each item/place/etc. Literally,
    Code:
    {if visitedDocks = 0}You haven't been to the docks.{endif}
    You can track length as these variables are updated, e.g.
    Code:
    {if nPartners = 0}You're a virgin.{endif}
     
    gene.sis likes this.
  3. RejectTed

    RejectTed Really Experienced

    Yes, but I think this would look a lot better in the score tab, be a bit simpler, and not require as much forethought.
     
  4. gene.sis

    gene.sis CHYOA Guru

    As you can show and hide variables, you can show only the active variables.

    Yes.

    With the current variable naming restrictions, it will not always be possible to determine the position of the actual operator and the end of the statement.
    (That is basically the main reason why it's not possible to compare a variable with another variable in an if statement.)
     
    RejectTed and insertnamehere like this.
  5. RejectTed

    RejectTed Really Experienced

    I was more so thinking that Harem Girls: Selina Kyle, Diana Prince, Solomon Grundy looks better than Solomon Grundy Harem Girl: True
    There would just have to be more strict naming conventions for the items in the array. So that you could be sure the right most operator is the actual operator.