Concatenation Problem

I’m using this code:


And it works.
But when I try to concatenate it, broadcast message on channel “o”, it doesn’t work. I know this isn’t super important but I’m trying to learn more about concatenation to become a better coder. Could someone explain why when I try concatenating, it doesn’t work?

Does the channel exist?
I mean, is it connected to anything?

1 Like

Yes, a damage boost.

What’s that damage boost’s rate?

1.25, 1.5, 1.75, and 2 times damage

Hmm…
Give me a minute. I’m having a brain blast-

1 Like

Does the property for, bonus, exist? Is it there?

Yes the whole system works when it isn’t concatenated. Everything is there.

1 Like

Here, maybe this’ll help.

From The Art of Concatenation: Credits to @Zypheir and @Blackhole927- Difficulty 7.5/10 or 🟧

I don’t exactly know what concatenate means, but don’t you have to have it broadcast a channel?

Concatenation is simplifying block code to significantly shorten the blocks placed.
Change the blocks after the first “if do” block into else-if conditions. [1]

Then, if you want to concatenate, you can turn your blockcode into this:

set [o] to Get Property "bonus"
change [o] by 1
Set Property "bonus"
       Value [o]
Broadcast Message on Channel | Create Text With "[channelnamehere]".

Then, you can make channels that receive on [channelnamehere]1, 2, 3 and so on and so forth.

Here’s another explanation on how it works:


  1. click the gear and drag the else block on top of the if i believe ↩︎

TYSM! It works! I didn’t know you had to use create text with.
Also, I had no idea I was using the same blocks as mysz’s concatenation guide lol.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.