- This topic has 11 replies, 2 voices, and was last updated 7 years, 4 months ago by Aura.
-
AuthorPosts
-
July 14, 2017 at 9:34 am #1299mystifyParticipant
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
EntryHowever 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…July 14, 2017 at 10:22 am #1300AuraModeratorHey,
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
EntryEdit: Okay I playtested this and changed a few things, it should work now!
- This reply was modified 7 years, 4 months ago by Aura.
July 14, 2017 at 11:02 am #1302AuraModeratorif 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.
July 14, 2017 at 11:24 am #1303AuraModeratorI 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
July 15, 2017 at 7:58 am #1305mystifyParticipantOh wow, I didn’t even think of that. You’re a life saver! Thanks! (^_^)
July 15, 2017 at 8:21 am #1306mystifyParticipantOkay, 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?)July 15, 2017 at 8:57 am #1307mystifyParticipantOh 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 bothGeez… that was hard. Now let’s see if I can get a third item needed in there… (-_-)
July 15, 2017 at 9:12 am #1308AuraModeratorHey 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! ^^
July 15, 2017 at 9:14 am #1309mystifyParticipantI’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.
July 15, 2017 at 9:25 am #1310mystifyParticipantif 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.
July 15, 2017 at 9:31 am #1312mystifyParticipantif 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. (=´∇`=)July 15, 2017 at 10:00 am #1313AuraModeratorMust 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. ^.^ -
AuthorPosts
- The forum ‘Get help’ is closed to new topics and replies.