Hi everyone, I am new to BB and i need help in making the switch node have 4 outputs. I know how to increase the output points but i guess i still need to modify the code of that node to make it functional with 4 outputs. I have no experience at all in coding (That's why i am using BB , so maybe you can help me find a ready made script? Thank you
Hi Mohamed and thank you for your quick reply. I've tried the script that you mentioned (copied and pasted it in the Switch Node) as it is and added 2 additional outputs (C and D) to the node, but unfortunately it didn't work. Should it work as follows? Each time i trigger the input, the switch should jump from A to B to C to D sequentially? Am i right or am i skipping something here? Many Thanks
it works fine here, just if "emit on start" equal true A will be true and the first trigger will be A too, after that everything will be fine screenshot for node connection
Yes "Emit on start" is enabled because i want it to start on A. Here is a screenshot. What i want is, each time the player hits this object the switch should flip to the next output until it reaches the "Output D" and plays a sound and trigger the "Send node" as you can see in the screenshot. When i connect the "Sound node" directly to the "collide" as a test, it plays the sound each time the object hits the player. So i am sure the collide setup is working fine but not sure about the switch. Thanks,
I also placed those different sounds (A, B, C, D) on each output to identify which output is being triggered each time the player hits that object, and found out that the "Output A" is always triggered and it's not jumping to B, C, and D...
inside start function - if(_emitonstart){} add this line Code: _switched = 1; I think when you test it, there are logs on right corner 0 1 2 3 right ?
Hi Again, I guess the problem is in my project. I've placed the 4 ways switch in a new project and it worked great. I will have to figure out what went wrong in my initial project. Thank you so much for your help