+1
Pending Review

Wait node not working correctly ?

Reaper 4 years ago updated by Lazlo Bonin (Lead Developer) 4 years ago 2

From this testing to discover a bug I came up with this flow graph, however it had unexpected results . 


What happens as you can see from the dots on the graph is that the flow goes into the one wait for 5 seconds, then switches to the other. However what happens next is the surprise, the flow then continues to run out of the wait as many times as it ran in even though the input flow has stopped. You can test it by severing the input flow in playmode.

Is this working as intended ? if so Id rename the node from wait and change the description as its a bit deceptive. 

This is the solution that I used to make it do what I would expect the wait to do,

 but it seems to me that it shouldnt behave this way as its probably not very effiecient, if you had many waits the time in that bit of the flow chart will mount up.

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

meant to post this in bugs but missed the box to click to put it there

+1
Pending Review

That's "by-design". Wait nodes can be entered as many times as you want and will create "parallel waits".

I do realize now that this is counter intuitive, and almost never the use case you want. 

I will likely rethink how wait units work in future versions. In the mean time, Jason might have made some of the units you want: https://support.ludiq.io/forums/5-bolt/topics/864-unit-tools-flow-control/