Multiple Tokens

Make Forums Get help Multiple Tokens

This topic contains 10 replies, has 2 voices, and was last updated by  Aura 1 month ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1299

    mystify
    Participant

    Is it possible for the hero to need to have three tokens in order to move on?
    I tried this by overlaying them but it doesn’t seem to work as I had hoped…
    EX:

    if hero lacks token “One”
    if hero lacks token “Two”
    if hero lacks token “Three”
    No Entry
    else
    Entry

    However all the hero would need is token “Three” to gain entry not all “One”, “Two”, AND “Three” as I would like.
    Do you know of any solution to this? I’m running out of ideas…

    #1300

    Aura
    Participant

    Hey,

    Try to indent the If function by each 4 spaces. And 4 spaces for the entry.

    Like this:

    if hero lacks token “Three”
    ` if hero lacks token “One”
    if hero lacks token “Two”
    else
    Entry

    Edit: Okay I playtested this and changed a few things, it should work now!

    • This reply was modified 1 month ago by  Aura.
    #1302

    Aura
    Participant
    if hero lacks token “Three”
        if hero lacks token “One”
            if hero lacks token “Two”
    else
        Entry

    Sorry about the post above. This is the right code.

    #1303

    Aura
    Participant

    I think this might work too (It’s the same code you had, only indended different!):

    if hero lacks token “One”
        if hero lacks token “Two”
            if hero lacks token “Three”
            else
                Entry
    #1305

    mystify
    Participant

    Oh wow, I didn’t even think of that. You’re a life saver! Thanks! (^_^)

    #1306

    mystify
    Participant

    Okay, so the code I tried was…

    If hero has token “Pen”
    <indent>If hero has token “Sword”
    <indent><indent>hero says “I have both”
    else
    <indent>hero says “I don’t have both”

    this enabled it so that if the hero had only the Sword then he said ‘I don’t have both’.
    if the hero had the Sword and Pen he said ‘I have both’.
    But if the hero had only a Pen then nothing happened…

    So half way to solving the problem but not quite completely…
    (BTW how do you get the neat little code pictures?)

    #1307

    mystify
    Participant

    Oh my word.
    That was the hardest thing to figure out!
    But I think I got it.

    if hero lacks token “Pen”
    <indent>hero says “I don’t have both”
    else
    <indent>if hero lacks token “Sword”
    <indent><indent>hero says “I don’t have both”
    <indent>else
    <indent><indent>hero says “I have both”

    This way-
    Hero has neither = I don’t have both
    Hero has Sword = I don’t have both
    Hero has Pen = I don’t have both
    Hero has Sword and Pen = I have both

    Geez… that was hard. Now let’s see if I can get a third item needed in there… (-_-)

    #1308

    Aura
    Participant

    Hey mystify,

    Great job figuring this out on your own! Glad I could be of help here!

    For the code pictures, just use the “code” button on the top of the text field! ^^

    #1309

    mystify
    Participant

    I’m gonna cry tears of joy! \(>0<)/

    I figured out the pattern!
    Thanks for your help there Aura. It gave me a really big hint. (^-^)

    With that previous pattern I unlocked the key to someone obtaining three items but ONLY those three items. If they grab too many then they can’t continue.

    Ex: Objective = Grab Sword, Pen, Gun (only)

    hero grabs Sword/Pen/Gun = “You don’t have three”
    hero grabs Sword and Pen/Sword and Gun/etc. = “You don’t have three”
    hero grabs Sword, Pen, Gun, Ax = “You have too many”
    hero grabs Sword, Pen, Gun = “You have three”

    Makes me so happy.

    #1312

    mystify
    Participant
    if hero has token "Ax"
        hero says "I have too many."
    else
        if hero lacks token "Sword"
            hero says "I don't have three"
        else
            if hero lacks token "Gun"
                hero says "I don't have three"
            else
                if hero lacks token "Pen"
                    hero says "I don't have three"
                else
                    hero says "I have three"

    This is the code used for the results I got from above.
    I’m so happy I finally figured it out. (=´∇`=)

    #1313

    Aura
    Participant

    Must have taken some time… Well done! 🙂

    Besides, it’s even better figuring it out on your own, cause then you really understand it!
    I can tell from my experience. ^.^

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.