SCRIPTING HELP

I need help!

I’m constructing a new puzzle map, that’s a complete revamp of an old one. I need to script a minimal puzzle I’ve got on it, which basically has five pipes, when you press a button in front of a pipe, the corresponding pipe cycles through 5 colours, and matching the correct colours wins the game. The issue is, when I press the button, all the pipes change indiscriminately regardless of which button I press, and they only cycle through two of the five colours.

I’m using a number check variant to generate the colours, so it cycles an increment from 1 to 5 with each colour change scripted at a set constant from 1 to 5.
I’m also using labels to dictate which pipe changes colour by scripting number change object: label (add) to each switch. But this isn’t working either.

You have all the basics down but complicated it a bit. I have a few solutions for this, but I’ll need to mock up a demo so I’m not just typing a bunch of descriptive words that you would still have to figure out. I’ll come back with a demo of scripts for you. If you get this before then, feel free to message me on xbl (b0b is here, zero in b0b), and I’ll help you in person.

You essentially just need to have a brain do a bit of the heavy lifting, while leaving all of the color change scripting on the pipes. You don’t need labels for this, but they can be useful if you want to consolidate scripts used.

> 2533274831077797;2:
> You have all the basics down but complicated it a bit. I have a few solutions for this, but I’ll need to mock up a demo so I’m not just typing a bunch of descriptive words that you would still have to figure out. I’ll come back with a demo of scripts for you. If you get this before then, feel free to message me on xbl (b0b is here, zero in b0b), and I’ll help you in person.
>
> You essentially just need to have a brain do a bit of the heavy lifting, while leaving all of the color change scripting on the pipes. You don’t need labels for this, but they can be useful if you want to consolidate scripts used.

Alright I have a DEMO map here for you with all of the following scripting I’m about to describe implemented for you to study. It doesn’t use any labels, but does use all of the scripting channels available on the 5 pipes I’ve placed. It works by a message terminal attached to the pipe sending the pipe a message. When the pipe gets the message, (pipes 1-5 are on message channels a,b,c,d,e) it tells itself to randomize a number (0-5, which is 6 numbers as I’ve included the default color at the 0 value and teams red,blue,green,yellow, and cyan for the 1-5 values). Each number has a color. When all of the pipes are cyan (#5), that number check script for the 5th color (it’s script 8 on the pipes; the last script) tells the pipe to go cyan and to turn on a power state (I’ve matched power states in same order; they are power alpha, barvo, charlie, delta, and echo). Back on the message terminal are extra scripts to do things whether or not the power is turned on from the pipe it’s attached to. If the power is on, it disables the terminal (you’ll notice I have them already despawning and respawning in 2 seconds after their normal initiation both as a visual queue and to stop spamming) and the terminal does a number change instead of check to force a neutral value, in this case global value alpha, to add 1 point to a counter (the lone brain in the middle above the pipes; this brain also forces global alpha to be a zero value so all points are added from that starting value). The counter goes up to 5 points, one for each pipe that powers on to make its terminal send the point, and then give a grunt birthday and kraken sound.

I have everything setup to be round repeatable, so you should be able to test this in Customs. When you score the round will end. You’ll know the pipe is cyan when the terminal doesn’t spawn back; I force it to quick despawn for the rest of the round after respawning normally.

To test this in Forge repeatedly, of course get all the pipes cyan and hear the sound, but reset it by turning scripting off and scrolling up a few notches so you pop up at the bottom the menu and select RESET MAP STATE. This will force everything back to its scripted default state so you can use it again. Turn scripting on to continue. repeat as needed.

Good luck, Spartan. Let me know if you have any questions about what was done. Feel free to message me on xbl of course. b0b is here, zero in b0b.