Arranging Scenes in Correct Order
1 Attachment(s)
I am a relative newbie to Python and Vizard despite being more familiar with other programming languages. I am sure this question has been asked over a thousand times, but here goes again!
I have taken over a project at my University that was abandoned by a previous employee. We are trying to simulate various events on our Campus and have several scenes that should take place in a specific order. I have modified the scripts left by the previous employee so that they work individually, but now I discover when combined, all scenes try start at once resulting in errors. The program is rather large and complex, so I have broken my code into object classes and various support modules that I won’t post here. Instead, I have written a pseudocode example of the problem I am having, namely that all functions run at once instead of in series as we intended (We are not using threads). Any help you can offer is greatly appreciated! |
I would highly recommend using the viztask module to control the flow of your program. Each stage would be implemented as a task and the main function would just yield each stage one after the other:
Code:
def stage1(): |
All times are GMT -7. The time now is 06:33 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC