removing multiple objects
Hello,
I cannot figure out how to remove or delete multiple objects that have been created this way: Code:
def balls(): Thanks |
You should save each object you create into a global list. Then you can periodically go through the list and remove the objects.
|
Is there a good example of this to follow?
|
I'm not sure there is an example that does exactly what you want, but the Duck Court example script that comes with Vizard shows how to save objects into a global list so they can be referenced later.
|
Code:
|
I'm not sure if I understand exactly what you want to do, but if you first make the global list and then want to take all the balls out of it, you could:
Code:
for row in range(len(ballList)): Or, you could just erase your list by re-initializing it (I think): Code:
ballList = [] |
Ok I will give that a try later... thanks for the feedback
|
Great I think it worked.
|
All times are GMT -7. The time now is 07:38 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC