Welcome Forums Get help Multiple Tokens

Viewing 12 posts - 1 through 12 (of 12 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
    Moderator

    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 7 years, 4 months ago by Aura.
    #1302
    Aura
    Moderator
    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
    Moderator

    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
    Moderator

    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.

    #1310
    mystify
    Participant
    if hero has token "Dynamite"
        hero says "I have to many"
    else
        if hero has token "Ax"
            hero says "I have to 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 lacks token "Pen"
                        hero says "I don't have three"
                    else
                        hero says "I have three"

    So this is what the code looks like for those kind of results. I’m planning to play around with it more but this gives some more opportunities to others to have a quest of a sort of search and find game. Or whatever.
    (=´∇`=)

    • This reply was modified 7 years, 4 months ago by mystify.
    #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
    Moderator

    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 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Get help’ is closed to new topics and replies.