Personal Lessons - CodeAlpaca

So, a lot of people are unsure how to use some behaviors or how to use them together.

As one of the foremost experts on flowlab (personal opinion, contact my lawyer for more information),
I would like to help improve some people’s games.


Now, I will not be solving whatever problems you may have here (though you can @me on a help request). What I will do here is train you to be able to solve your own problems.
So what I will do is:

  1. Give me something you want to learn about (ex. Lists, Spawn, it can be a little more specific if you want)
  2. I will make some example problems for you to solve progressively getting harder. If you do anything inefficient or get stuck I will explain what went wrong and why.
    These practice problems will be used in a variety of ways to give you a wide spectrum of how these things can be used in ways you probably haven’t thought about.
  3. As a bonus, I will give you some tips for organizing code if you want :slight_smile:
    (This will all happen in a PM)

So feel free to ask away! (I will not respond instantly because I am still working on my own projects, but when I get a chance I will). Hopefully, I can keep this topic alive because I solve problems every day anyway, so it’s nothing that different than what I’m already doing.

Note: For learning purposes, I will summarize what we went over in the PM on this topic so others can learn from it too. I will also list the problems that were encountered and how they were solved

9 Likes

And you can have all this for the low price of $0.00 + a heart :llama:

Also, each lesson will span a MAXIMUM of 3 days. So if you do not respond quickly enough the lesson will end so that I can keep things flowing.

8 Likes

I’ll use your service during the flowjam wink wink

/j

1 Like

Okay Mr. Alpaca!

2 Likes

Can you train me how to make an epic final boss battle for Gamougg please?

2 Likes

Not exactly something I can help with, that’s more like game design. If you want to know more about how some behaviors can be used I could help with that.

2 Likes

Yeah, I would like some help with that please.

1 Like

I need to know what you specifically want to learn

1 Like

How to make an epic boss battle like Metal Gear Rising: Revengeance

That’s game design you’re asking for

Okay, I change my mind and specifically, I would like leaderboard behavior help.

1 Like

Ok, after I finish working on my game for a bit and eat food I’ll contact you

1 Like

:muscle: :+1:

2 Likes

Is this kind offer still active? If so, I’d love to learn more about what I can do with text lists.

3 Likes

Yep, it’s still active! Happy you’d like to learn more about it

3 Likes

In that case I’m into it at your convenience! I’d like to be using a lot more narration and dialogue in my games and I don’t want it all to get too messy so I’d like to know the optimal techniques to use with those blocks.

3 Likes

Great! I’ll probably DM you sometime today or tomorrow.
Also, text lists can be used for much more than just dialogue, but those get into some really advanced topics so I’ll probably not talk too much about that.

3 Likes

Just want my characters to be able to talk, respond to dialogue choices, and maybe require correct user typed input in order to unlock something.

3 Likes

Summary of some of the key points. I didn’t really explain the fundamentals of lists, more so how they could be used in the case he wanted

Summary

"Knowing the basics of all the other behaviors is very important and should make this much easier.
So you’re already doing great.

Step 1: What you want

So typically when I’m stuck on a problem I like to break it up into very small parts, and normally just from this the answer can reveal itself.


  1. Click option A or B
  • If A is clicked, show Dialogue A
  • If B is clicked, show Dialogue B

(So it’s: Click Option → Select Dialogue Option → Display Dialogue)


Step 2: What you now know

So I’m sure you already know that, but if we break it apart more we see there are 2 dialogues (A & B).
This means that 2 Text Lists will be used, one with dialogue A and the other with dialogue B.

Now you need to activate those dialogues with a clicking option.
(I’ll explain how to format the text inside the lists later).


Step 3: Complete the beginning part

So the first part is being able to select an option.
I’m assuming you already know how to do this, but in case not I’ll explain a little.

  • If object A is clicked, send a message equal to 1
  • If object B is clicked, send a message equal to 2
    (These messages will be sent to the object with the dialogue)

What will be done with these messages?

Using a Router you can select specific outputs via the “Select” input.
(Make sure it is set to “Select specific route”)

Output 1 will give Dialogue A
Output 2 will give Dialogue B


Step 4: Complete middle part(s)

Most everything you will make will have an activation and a result. But the key part is the steps in between to reach that result.

In this case, you have already selected a dialogue option, now you need to have to give dialogue to your display function (I’ll explain the display function later)

This step requires knowing how lists work. Let’s say you want to show the messages
(1) “Hello, nice to meet you.”
(2) “What’s your name?”
(3) “That’s an awesome name!”

You would need to get these items from inside the List (“items” just refers to the text that is held within the Text List)


I will be using this as the example list
[(1)“Hello, nice to meet you.”, (2)“What’s your name?”, (3)“That’s an awesome name!”]
( I used (1),(2),(3) to show that these are separate items and their placement within the list. This number is referred to as the Index)

Technically there are 4 options that can give you these items, but in slightly different ways.

The "All" output. This will output the entire list, but you are looking for individual items so this isn't what you're looking for.
The "One" output.

If you input a number into the “One” input, it will give you an item at that index.
This means if you input 1, you would receive the output “Hello, nice to meet you.”
If you input 5 (a number greater than the total indexes) you would get the last item in the list
“That’s an awesome name!”

This will give you individual items within the list like you want. So if you wanted to get the values this way, you would do this

Number=1(Out) → (+)Number=0 → (One)Text List(One) → Output is the item at that specific spot. Each time you want to show the next message, you would increase the value by 1 to get the next item.

The "Pop" output.

This will REMOVE the LAST item in the list. This is NOT dependent on what the input value is.

So using the example list, the first time you input you would get
“That’s an awesome name!”
Then “What’s your name?”
And after that “Hello, nice to meet you.”
(If you inputted any more after this the list would be empty, so you would receive no output)

This is not exactly what you’re looking for because it’s backward, but it’s almost there.
To fix this you could do 2 methods.

  1. Enter all of your dialogue in reverse order.
  2. To make it a little easier you can write all of your dialogue like normal, and then use the List Order behavior to reverse it.
The "Join" output.

This is not what you want.

In summary, it combines everything in the list with what you inputted.
So if you input "CAKE " the output result would be;
“Nice to meet you.CAKE What’s your name?CAKE That’s an awesome name!”

"

“Also if we break this down, we see that there are lots of different messages being displayed, so if we had 6 different Text or Text Lists that would just seem ineffective. So from this, I know the solution should involve a single Text List and a way to get values at specific spots from it using the “One” input.”


"For constant 2-answer responses, this will work

(B = 0 in the expression)
If “Yay! Hug?” is chosen, B is now equal to 1.
So if option A is clicked (“Have a hug?”) The expression will be A(1)+B(1)*2 = Index 3"

Problem: What if we wanted more or less than 2 options?


image
This will allow you to have however many responses you want

What the Number List includes is the number of EXTRA options that will be below the next branch.

A little confusing, but lets say you had 3 options at the end “Have a hug?”, “No worries.”, “Maybe?”
Now for branch B (“Have a beer!”, “I understand.”) there is 1 extra option below it.
So when you click “I’m sorry. Beer?” You’ll have to know how many extra options (if any) A will have. This stacks, so next time there is an extra option it will be 2 instead of 1.


More information about this version to clear up confusion

"So if you had first 2 answers, the extra count would be 0
If you then have 3 and 2 answers, the extra count would be 1
If you have 3 and 2 answers again, the extra count would be 2
If you had 1 and 2 answers, the extra count would be 1

The extra count is a running total of all the extras"

4 Likes

Longest post ever.

Good info though!

3 Likes