Howdy, Stranger!

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

New Image Functionality and Arrow Pointers

Hey! I just found Twine by way of a great CYOA game introduced to me by a friend. I got a hold of the engine and started making some major changes by way of macros and javascript. The image functionality is great and allows me to do this without as much HTML:

undefined
undefined

Not claiming the story is anything special. Just placeholder everything while I get the macros and parsing working. Here's the problem.

undefined

This is with only 3 passages referencing art. Im not saying its a bad thing in general, but for my purposes, 50 passages in, these arrows are going to get extremely annoying. Is there a way to toggle off arrows that references images? I'll deal with it if needed, but I'd rather not.

Comments

  • Oh, wow! That looks so awesome! :)

    What's the name of the CYOA game that your friend used to introduce you to Twine?

    I'm making a CYOA roguelike that uses (four) player-selectable attributes. Those up and down arrows look really cool. Are they functional? If so, will you share the code for them?

    Love the RPG Maker on steroids vibe your game has.

    Sorry, I don't have an answer about the passage connection webs. :(
  • A game called Masculine Mystique, which to warn is an adult game, but most importantly it showed me what the Twine engine is capable of. So I'm taking a crack at it.

    I don't mind sharing the code at all, especially since that doesnt even involve macros or javascript. Its just some cleaver use of Twines built in functionality.

    First on our start page we have to set some variables. I'll limit this to keep it simple.
    <<set $physical = 1>>
    <<set $freepoints = 6>>
    Then we move to our CharGen page, we perform a check.
    <<if $physup>>
    <<if $freepoints > 0>>
    <<set $physical += 1>>
    <<set $freepoints -= 1>>
    <<else>>
    What happens if you don't have enough free points.
    <<endif>>

    <<if $physdown>>
    <<if $physical > 1>>
    <<set $physical -= 1>>
    <<set $freepoints += 1>>
    <<else>>
    What happens when you can't bring your strength below 1.
    <<endif>>

    <<set $physup to 0>>
    <<set $physdown to 0>>
    Its important this comes first, because when we click the arrows, we reload the page and these actions need to happen immediately. Then somewhere on the page we do this.
    [[|CharGen][$physdown = 1]] [[|CharGen][$physup = 1]] Physical: <<print $physical>>
    Tada. The page will reload and the new physical stat will be displayed.

    But yes. If anyone knows how to get rid of those arrows let me know. Also how do you comment things out in Twine?
  • Yay! A question I can answer!
    /* Comment */
    I'm not at my computer right now, but I think I can update without reloading a page. I'll check and post back.

    I'll check out that game, too! :)
  • Sharpe wrote:

    Yay! A question I can answer!
    /* Comment */
    This is incorrect. The actual code is
    /% Comment %/
    As for the arrows... well, I designed them primarily to serve as notifications for where and how much a particular resource is being used in a story. In that respect, I tried to make them as dim and innocuous as possible. But, I guess I can put in a preference option in Twine 1.4.1.
  • L wrote:

    Sharpe wrote:

    Yay! A question I can answer!
    /* Comment */
    This is incorrect. The actual code is
    /% Comment %/
    As for the arrows... well, I designed them primarily to serve as notifications for where and how much a particular resource is being used in a story. In that respect, I tried to make them as dim and innocuous as possible. But, I guess I can put in a preference option in Twine 1.4.1.


    You are a godsend for that comment tag. Its been bugging me all day. As for the arrows, it would be a welcome feature, yes. Twine is awesome. Thank you.
  • L wrote:

    This is incorrect. The actual code is
    /% Comment %/

    I noticed that commented out text shows up in the actual built HTML page. Is there a way to have it automatically stripped out so I can have developer notes that aren't shared with players?
  • I'm not having any such issue with the comment tags showing up in built html files. At least in Chrome. Its working like a charm now that I know what the code is.
  • nomdepony wrote:

    L wrote:

    This is incorrect. The actual code is
    /% Comment %/


    I noticed that commented out text shows up in the actual built HTML page. Is there a way to have it automatically stripped out so I can have developer notes that aren't shared with players?

    As of right now the only way to make notes that are excluded from final builds is to put them in passages tagged "Twine.private".
  • CoraBlue wrote:

    I'm not having any such issue with the comment tags showing up in built html files. At least in Chrome. Its working like a charm now that I know what the code is.


    No problem with the commented text being displayed to people, but it's inside the HTML, so someone who looks at the source can find it. Ideally it wouldn't be available at all, but it is not a huge problem.
  • Oops! That's what I get for going from memory rather than looking it up.

    I looked at that macro HarmlessTrouble wrote for updating, but it won't make the passage update with each press of the +/-.
  • That is fantastic, CoraBlue. I never realized the true flexibility of the Twine system's usage of images until I saw your example.
Sign In or Register to comment.