Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Help with logic regarding Questions & Answers

Archive: 13 posts


In the level i am working on i wish to include a section wherein i am talking to someone via a radio. I wish to include the option to choose between which answers you can give thereby taking the conversation in different directions. I can't, for the life of me, work out the logic needed for this. Can anybody help?2011-12-11 18:21:00

Author:
TEENWULF
Posts: 133


There are a few ways to do this. The simpler way that I would use would involve making an onscreen prompt with a magic mouth that tells you the various responses and what button activates them. You then make a selector with the button of each response wired into one of the imputs, and the output will determine what the guy on the radio will say. The other method would involve making a menu that shows responses. There are many tutorials on how to make a menu. Hope this helps! 2011-12-11 20:27:00

Author:
Joey9898
Posts: 131


I'll get on my PC and type out some in-depth novel about how to go about making this tonight. Please stop me if you figured it out already!2011-12-12 03:31:00

Author:
Speedynutty68
Posts: 1614


nope, not figured it out, so any help you can give me would be greatly appreciated. I'm looking to do different questions, each with 2 or 3 possible answers which in turn will lead on to their own "next" question. I hope that made sense. Thanks!2011-12-12 08:55:00

Author:
TEENWULF
Posts: 133


A dialogue tree is fairly simple to make.

http://i92.photobucket.com/albums/l37/Corporeal/686dcdf0.jpg

This represents 3 sets of questions with 3 choices each, resulting in 27 possible outcomes. This circuit can be reduced to one functional block which is simply repeated per question.

http://i92.photobucket.com/albums/l37/Corporeal/cf053293.jpg

The idea is the blue selector towards the bottom advances by 1 each time the player presses the button (in this case X) to select an answer, this activates the 2nd port of a series of AND gates with the 1st port being the player's selection, meaning only 1 of the 3 microchips in the next set will be activated.

http://i92.photobucket.com/albums/l37/Corporeal/fe63da6b.jpg

Here the player is selecting the 2nd choice from the first set of questions.

http://i92.photobucket.com/albums/l37/Corporeal/49708a2b.jpg

When X is pressed the 2nd port of the selector immediately outside the microchip is activated and the blue selector is cycled by 1. This results in the 2nd microchip in the next set of questions being activated, which the player can now select from.
2011-12-12 12:28:00

Author:
Ayneh
Posts: 2454


It sure looks impressive but i wouldn't know where to start! is it possible to bring up a speech bubble containing each question followed by a menu featuring each possible answer and which button to press?2011-12-12 14:27:00

Author:
TEENWULF
Posts: 133


Ayneh, not that I disagree with you, but TEENWOLF seems to have trouble with logic, so shooting waves of pictures won't really help him ^^

Do the questions depend on other questions ? Lets do an example :

Man : How are you ?
1)Fine, and you ?
Man : Fine thanks. (continues walking away, this was just a hello)
2)Not too well actually...
Man : What's wrong ?
a) I feel sick
b) The cake is a lie

Here after choice 1 it answers and that's it, while choice 2 makes the man ask a question he wouldn't have asked before. If questions are asked because you answered X to a previous question, it gets more complex, such as Ayneh's display. You should perhaps go see the LBPtorials on youtube. It will teach you basic logic. Start by learning to use selectors a lot, then come back to this.
2011-12-13 00:18:00

Author:
Unknown User


Oops... Dindnt have a chance last night... Dx Sorry. If you can get Ayneh to put those pictures into words, you should be good. That was pretty much what I was going to have you do...2011-12-13 00:24:00

Author:
Speedynutty68
Posts: 1614


yeah that's it basically. I don't have trouble with most logic but this escapes me. what i would like is: Question 1 followed by either answer A or answer B. Then following answer A is another question or following answer B is a different question and so on...2011-12-13 00:28:00

Author:
TEENWULF
Posts: 133


Okay, I have time for it, I'll try to help, though I'm not on the PS3 right now. You can make it two ways : either you make a menu with hologram words, either you use bubbles. Bubbles are way faster because you just have to type the text in (just watch you spelling ) them. Now when you set a magic mouth to one-shot, it will output a quick signal (I call those pulses) when you press circle to close it. You can then make a chain of mouths by hooking mouth A to mouth B, mouth B to C and so on. Now if you have a question, pressing circle after the question should bring up another bubble with a list of options and the buttons written next to them. Example :

BUBBLE A
Man : How are you ?
BUBBLE B
(L1) Fine, and you ?
(L2) Yeah, whatever...
(R1) Are you talking to me?
(R2) Sorry I'm in a hurry

Now I don't recommend using the X, Square, Triangle and Circle buttons because they deal with opening-closing bubbles and the popit or jumping. L1,L2,R1 and R2 are the best. To use the buttons, use a controllinator set to "receiver" with color set to closest player. With only one player it should work fine, with more... we'll see that later


How to do it actually then ? Well, when is BUBBLE C going to be shown ? Only if you press L1 and are at bubble B. (deal with only first choice for now)
You know how to make a permanent gate, right ? Just place a counter set to maximum of 1. When it is activated once, it's on forever. Since the mouths are set to one-shot, it doesn't really do anything else to keep the input on, it won't keep them open if the player closes them. Place a permanent gate after your question's bubble (hook the mouth to the gate). When you close the question's bubble, it will activate the permanent gate and show you the options. Connect the permanent gate to a AND gate. What you want to do is "if I'm at bubble B AND I press L1". Hook the L1 button to the other input of the AND gate. Now the problem is, you want to disable the permanent gate when the answer is given so that L1 doesn't always bring you back to bubble C. Place an OR gate with 4 input, one for each option button of that question (L1 L2 R1 R2) and hook the output to the permanent's reset (now we should call it a set-reset gate). When you answer, the gate goes off which sets the AND gate off again, which makes sure it doesn't reactivate the bubble C in loops. Let's draw :

http://img23.imageshack.us/img23/861/baddrawings.png

Don't laugh. The M's are mouths, the half-circle is a AND gate, the Purple L1 is the controllinator's L1 output and the cyan thing is the set-reset gate (counter). The first mouth is the question, the second mouth is the choices, the third mouth is answer L1. Now I didn't place the OR gate setup on this one to keep it simple. Here's with the 4 options and the OR gate :

http://img217.imageshack.us/img217/861/baddrawings.png

As you can see it gets pretty messy. This is only one question with 4 choices though... Because if the 4 mouths on the right are actually questions, well you need the exact same thing at the end of each answer. This is why it gets pretty confusing very fast. Try to put the logic on a chip, then copy-pasting the chip inside itself to do sub-questions and so on. Actually, the first question is out of this chip you copy-paste.

Hope this helps Something tells me Ayneh was doing things to big
(ooo it's allready this time yawn goodnight)
2011-12-13 02:57:00

Author:
Unknown User


wowzers! thanks for this, i'll give it a go!2011-12-13 12:39:00

Author:
TEENWULF
Posts: 133


It sure looks impressive but i wouldn't know where to start! is it possible to bring up a speech bubble containing each question followed by a menu featuring each possible answer and which button to press?
Yes, that's all implicit in the design. You would just place the magic mouth in the microchip and wire the selector to the different menu/dialogue options.
2011-12-13 14:30:00

Author:
Ayneh
Posts: 2454


I've done it! Thanks for your help everyone, especially pivottt and ayneh for taking the time to show me with diagrams.2011-12-13 15:39:00

Author:
TEENWULF
Posts: 133


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.