Howdy, Stranger!

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

twine 2 : is there any method by which i can use a variable throughout the story

edited July 2015 in Help! with 2.0
hi, i m new to twine (and coding) my question is
1 is there any method by which i can use a variable throughout the story

for example i declared a variable in first passage but also wanted to that variable again later for calculation,displaying changed values
i m using twine 2 harlowe format

Comments

  • Yes.
    (set: $someVar to "Yes, yes you can.")
    (set: $another to 5)
    (set: $oneMore to true)
    
    The Harlowe documentation may prove useful.
  • thanks, for answering that
    actually i asked a totally idiotic question in a wrong way
    thanks for being patient

    actually, i check my expressions and functions separately before incorporating into game
    the thing is i wrote a variable and wanted to use that later in next passage
    and then i did the stupidest thing ever i was testing that later passage and every time it resulted in zero. i wasted my whole day figuring it out. so i posted it here.

    then i figured it before testing first passage(expression) i will never get the later expression as the expression is not calculated yet by the system.

    so that was very "logical" mistake. LOL

    thanks again for sparing your time.
Sign In or Register to comment.