Huge switch statements; is there a way to run code in order without checks?
Edit: Found Multigate is what I wanted but it breaks after adding 30+ outputs, so it isn't working. It simply won't run if I have more than 30 outputs. Anyone know why?
I am trying to make a mini-music game that has about 500 beats. On each beat it may run a different code. Is it ok to use a Switch on Int statement (counting the beats) for 500 of them? After adding 30 the editor's Switch statement becomes weird (dissapears when I Add pin, need to scroll back up to make it appear again) and so adding 500 would take crazy long.
What would help this and save the game to do a huge check is to just have a repeatable execution node that proceeds to the next node after the previous has ran. Something like:
you are looking for the Sequence node. as awful as it sounds. lol.
if you have a problem with 500 on a single sequence node, just split them up to levels, so for example the first sequence will have 10 outputs, each leading to another sequence node....etc..
tip: nodes menu (right click in blueprints graph) contains drop-down stuff by categories. sequence is in "Flow Control" category, which is very useful and in my opinion everybody has to learn all of them (not too many) to be effective. it's worthy.
good luck :)
answered Mar 05 '17 at 10:26 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here