Howdy, Stranger!

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

I have no idea what I'm doing. (help please)

Okay, I've been fiddling around with twine. Looking at the wiki and testing things out. I've used it for maybe a few hours and I'm no coder. This is very simple stuff and its still is frustrating me.

A few questions. (I've used mostly sugarcube. It's 1.4.2 newest verison, that I've downloaded.)

1. I tried to use <<typeinput $name>> something similar to the example in the wiki. In an attempt for when I do <<$name>> or <<print $name>> <<display $name>> I've tried adding remember, is, to, everything...to no avail. I just wanted to make it display the name in the dialogue that I typed out. It always just shows me a 0 or an error message. How exactly is this done and can it be done?

2. Is there anyway to have someone return to start, using <<previous>>? Like you died <<Try again|previous>> but all that would do is take you to the previous page.

3. Displaying actions on one page. I've figured out how to use choice/actions and their differences. But I have no clue how to have the actions/choices displayed all on one screen. Similar to the pot example on the wiki page.  Is this only possible in Jonah?

4. I've noticed a lot of the help on youtube and the wiki site is not updated. I didn't know at the time. I set up a scenario were you had to use press two buttons before something would activate, <<set $redbutton eq "on">> something like that and it worked. I noticed that eq was not supposed to be used anymore. So I changed all the coding with is instead. Suddenly the code didn't work. Confused, I just put it back to eq. It didn't work when it was working before. I've yet to fix it...I tried closing and reopening it but it still didn't work. So did I screw the whole thing up/why would this be happening?

Hopefully what I asked isn't confusing, and I would greatly appreciate any help and advice given to me. Thanks for reading. :)

Comments

  • Onewithquestions wrote:

    Okay, I've been fiddling around with twine. Looking at the wiki and testing things out. I've used it for maybe a few hours and I'm no coder. This is very simple stuff and its still is frustrating me.

    A few questions. (I've used mostly sugarcube. It's 1.4.2 newest verison, that I've downloaded.)


    SugarCube or Sugarcane?  I ask because people often mix them up and they're really not the same thing (my fault, really, I should have named SugarCube something different).  Sugarcane comes with Twine and is one of the "vanilla" story formats.  SugarCube is not a vanilla format and must be downloaded separately.

    The easiest way to tell is to look at the menu.  If you see a Saves menu, then it's SugarCube, otherwise it's probably Sugarcane.

    If you are actually using SugarCube, then you should start by taking a look at its documentation, because not everything is the same as with the vanilla story formats (which is what the wiki documentation covers, the vanilla formats).


    Onewithquestions wrote:

    1. I tried to use <<typeinput $name>> something similar to the example in the wiki. In an attempt for when I do <<$name>> or <<print $name>> <<display $name>> I've tried adding remember, is, to, everything...to no avail. I just wanted to make it display the name in the dialogue that I typed out. It always just shows me a 0 or an error message. How exactly is this done and can it be done?


    If &lt;&lt;typeinput&gt;&gt; is not a typo, then that's what is wrong.  No story format has a text input macro by that name.

    If you're using SugarCube, then its text input macro is &lt;&lt;textbox&gt;&gt;.

    If you're using Sugarcane, then its text input macro is &lt;&lt;textinput&gt;&gt;.


    Onewithquestions wrote:

    2. Is there anyway to have someone return to start, using <<previous>>? Like you died <<Try again|previous>> but all that would do is take you to the previous page.


    Just return to the Start passage or restart the game?  Both are possible, but only the latter will restart game (which you'd likely want in a "Game Over" situation).

    The former, which is probably not what you want, could be done thus (in either format):

    [[Try again|Start]]
    The latter, which is probably what you really want, could be done thus (in either format):

    [[Try again|Start][state.restart()]]
    The Start passage there is simply to make the link valid.  The state.restart() in the setter portion is what really does the work.

    Alternatively, you could also do it like this in SugarCube:

    <<click "Try again">><<run state.restart()>><</click>>

    Onewithquestions wrote:

    3. Displaying actions on one page. I've figured out how to use choice/actions and their differences. But I have no clue how to have the actions/choices displayed all on one screen. Similar to the pot example on the wiki page.  Is this only possible in Jonah?


    It works in any story format.  Are you perhaps not understanding the example fully?  When you see the double colon (::) and some text that denotes a new passage.  For example:

    :: Pot actions
    Means that you create a new passage named Pot actions.


    Onewithquestions wrote:

    4. I've noticed a lot of the help on youtube and the wiki site is not updated. I didn't know at the time. I set up a scenario were you had to use press two buttons before something would activate, <<set $redbutton eq "on">> something like that and it worked. I noticed that eq was not supposed to be used anymore. So I changed all the coding with is instead. Suddenly the code didn't work. Confused, I just put it back to eq. It didn't work when it was working before. I've yet to fix it...I tried closing and reopening it but it still didn't work. So did I screw the whole thing up/why would this be happening?


    You're confusing conditional (testing) operators with assignment (setting) operators.  You should have used one of the following assignment operators:

    <<set $redbutton to "on">>
    <<set $redbutton = "on">>
    The is and eq conditional operators are used when testing a condition.  For example:

    <<if $redbutton is "on">>stuff<<endif>>
    <<if $redbutton eq "on">>stuff<<endif>>
  • Thanks for the quick reply.
    My mistake you're correct its the default format sugarcane. I saw you can download something called sugar cube and mixed up the names.

    1. Yeah, it was a typo. Should of double checked that. How does text input work anyway?

    2. Thanks!, solved that one easy. That doesn't seem to be on the wiki. No wonder I couldn't figure out.

    3. Me not understanding the example properly? That can't be. I'm s-m-r-t. I kid. Yeah, I probably am...Maybe I'll have to try testing this one again.

    4. Ah, that solved my problem again, I never would of figured out by myself either. thanks a bunch. ^.^ That made things easier.

    Glad there are smart people that actually know what the helk they are doing around here. XD
  • Onewithquestions wrote:

    1. Yeah, it was a typo. Should of double checked that. How does text input work anyway?


    Should be pretty much as the documentation and example shows.  Based on your original post, I'm assuming that your problem is that you didn't use the submit button.

    Using built-in button:

    Name? <<textinput $name [[Next]]>>
    Or using the external button:

    Name? <<textinput $name>>
    <<button [[Next]]>>
    Then, in following passages:

    Your name is <<print $name>>.
    For example:

    :: Get name
    Name? <<textinput $name [[Next|Got name]]>>

    :: Got name
    Your name is <<print $name>>.
  • That worked. Huh. I could of sworn I did that...But thanks! Greatly appreciate the help.
Sign In or Register to comment.