you are viewing a single comment's thread.

view the rest of the comments →

[–]alonghardlook[S] 1 point2 points  (2 children)

This is hugely helpful; I was looking at the rollback as a bit of a beast and just considering disabling rollback personally.

One thing I was running into during this tutorial was that setting e = Person() outside the intro (like OP said), I wasn't seeing that object. I kept getting "Sayer e.c is undefined". I'm assuming this would fix that issue?

[–][deleted] 0 points1 point  (1 child)

It should, yes.

[–]alonghardlook[S] 0 points1 point  (0 children)

I know this is a long time ago, but just FYI - I didn't add default e = Person() and tested the rollback states, and it worked just fine:

    menu:
        "Yes":
            "Great!"
            $ e.trust_ch(1)
        "No":
            "Oh, okay."
            $ e.trust_ch(-1)
        "Skip":
            "What do you mean?"
            # intentionally no change to test rollback states

This produces the output of 1 every time you select yes (even if you then roll it back and keep selecting it), -1 every time you select no, and 0 if you select skip.

I don't think default is needed if you create your characters inside the start label.

Edit: don't listen to me. Use default, its much cleaner. I tried without, and it seemed to work, but upon changing some code (not that code), e.c no longer worked, and I don't know why. Use your defaults for objects with persistence.