Iterating through Objects of a Type

2 views
Skip to first unread message

Joel McCoy

unread,
Apr 25, 2010, 11:17:36 AM4/25/10
to Mekanimo
Hi all,

Incredibly simple question, I'm sure- betraying my lack of python
experience.

What array holds objects of a type? For example, to iterate
through all 'circle' bodies, how does my 'for' statement look?

So to just ground every Circle, for example:

for cir in (????):
cir.grounded = True

I appreciate your help!

--
You received this message because you are subscribed to the Google Groups "Mekanimo" group.
To post to this group, send email to meka...@googlegroups.com.
To unsubscribe from this group, send email to mekanimo+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mekanimo?hl=en.

Fahri

unread,
Apr 25, 2010, 9:18:06 PM4/25/10
to Mekanimo
You can use

for cir in system.circles:
cir.grounded = True
Reply all
Reply to author
Forward
0 new messages