Hi there,
Procedures are encapsulated sets of puzzles that are only triggered when you “call” them.
I personally create everything in procedures and do not leave any puzzles dangling outside of one because your code executes based on where the puzzles are laid out in your work space vs executing in the order you expect. Just makes things much easier.
You do not need a “wait promise”. You need a slightly different approach.
What you need is a way to know if the puzzles in the first procedure are done before executing the next procedure.
There are a number of solutions: timers, status flags, whenfinished, on frame, condition statements, etc.
There is also a procedure that has a “Return”. This will execute the puzzles within a procedure and then return a value so you know when that procedure is complete. The biggest thing to remember is that when you play animation within a procedure the procedure will sometimes “finish” before the animation does. In those cases…its best to set a flag on animation done. If the animation is long..you have to poll if animation is running and then estimate its completion…poll again and if not running…execute the next procedure.
If you could provide a sample of what you are trying to do. I could give you a more specific example / demo.