Howdy, Stranger!

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

Help with Variables and Expressions (Morality Bar)

I've been trying to set a morality bar for the hero of my detective game on Harlowe. If they make a good cop decision, it's (set: $attitude to +1). If they make a bad cop decision, it's (set: $attitude to -1). My understanding is that this will add or subtract a number from their current score as they keep going. I'm still pretty new to this.

Now I tried to make it so that different characters react differently to the detective depending on how she's aligned. A rebellious witness, for instance, will react better to her if she's less by the book, so I try to set the dialogue like, (if: $attitude is < 0)[Here's the deal...](else:)[I'm saying nothing.]

But the game's not responding to this. I used the print option, and the game is counting the points correctly. What am I doing wrong?

Comments

  • edited August 2015
    AnimeJune wrote: »
    (if: $attitude is < 0)[Here's the deal...](else:)[I'm saying nothing.]

    I guess this should work.
    (set: $attitude to 1)
    (if: $attitude > 0)[
    Here's the deal... 
    ](else:)[
    I'm saying nothing.
    ]
    

    If you have some doubts with de logical operators you can look for http://twinery.org/wiki/expression

    I hope that helps :)
  • AnimeJune wrote: »
    If they make a good cop decision, it's (set: $attitude to +1). If they make a bad cop decision, it's (set: $attitude to -1). My understanding is that this will add or subtract a number from their current score as they keep going. I'm still pretty new to this.
    You first (set:) example is assigning a value of 1 to the $attitude variable, the second is assigning a value of -1.

    The following two examples show how to add / subtract a number from the $attitude variable in Harlowe, notice the use of the it keyword:
    (set: $attitude to it +1)
    (set: $attitude to it -1)
    
Sign In or Register to comment.