This was in a character selection widget. For the sake of learning, I’m trying to understand why the three Do Once nodes on the right side of a switch on string did not work, yet a single Do Once Node on the left of the switch on string worked. Any idea? Thanks.
No I did not want a reset here, just for them to do their job and do once, and they failed.
When the first Do Once is Working, print the String Out and check if the Switch have the same value.
Well that is just it, apparently it works on the left side of that switch and not the right. I wonder why.
Set a breakpoint on the do once or on switch Node…Then you can go through the individual nodes with F10 and see exactly where it hangs
add a print string to all execution pins including default on the select node, first step in debugging
Are you sure the do once nodes are even the problem? Seems more likely the switch on string is firing the default value or the casts are failing.
I suppose it is much more efficient to have only one do once node before it all. It worked out in the end.
I appreciate all the responses to this thread. And while print string seems invaluable to debugging surely, in this case I do not see how a print string explains why a do once did not do once. Yes it is receiving fire…and more than once.
I was hoping someone could offer me a technical explanation why this is occurring.
Thanks all for the replies.
What does it print here then vs the pins it’s supposed to output through:
Post results. Or use breakpoints / debug data flow to see where the execution is going.
offer me a technical explanation
User error.
Before
After
In both cases it seems to only fire once. The problem is (and I have it set up to have a ding sound when you choose character along with other character icons dissappearing) that after the choice is made I can press left and right and face button more, and if they are after there is multiple dings and I will not start as the character selected. However before, seems to work correctly, hence a do once.
I admit I should have just used one here in front instead of multiple for efficiency sake, but hopefully you of all here can offer me an explanation as to why this is occurring. Just something for all of us to expand our knowledge of the engine. Thanks for checking it out.
I meant the values of CS String
P1CS000 and P1CS002 for Player1 Character Select 000 and 002
In that case extra things happen we cannot see here. The above setup would execute once for each DoOnce node.
Just to be sure: are you aware that each do once will execute only one time, but collectively if there is three different DoOnce on three execution paths they can each execute once?
What I mean by that is that if you select your character with your string as PICS_01, and then re-execute the script with the string set as PICS_02 then the second DoOnce on the second path will be able to execute since this specific DoOnce hasn’t not yet been trigger. Each node is independent.
I think you just solved it. Good job.
What was happening here or supposed to happen was a Do Once before that switch on string would shut down all the face button inputs once a character was selected, but having them individually they did work but you could select more than your initial character which was what was happening here. In hindsight it is kind of a DUH moment. But hey you miss things lol.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.