Boid Particles

Hi guys !!!
I am a Python newbie with a problem with a script;
I’ve done this:
this is script (incomplete) create 4 plane (1 Emitter and 3 Killers) and a Particle System with boid physic emitted from the Emitter :cool:
Let me explain my problem:
If i write print( em.particle_system[‘ParticleSystem’].setting.boids ) in the python console the answer is BoidSettings that is correct but if i write the same thing in my script the answer is None!!:frowning: here is the error message
Now i think is it a bug or am i doing something wrong???
Thanks !!!

You might want to do subtle commenting, while in debug stages of writing this thing. If you want to debug this yourself, then write the shortest amount of code that reproduces this problem (Narrow it down to the stuff you don’t understand) , and see if you can make it work.

Hi zeffii!!
Thank you for your reply but the problem is still alive; indeed if in your script you write print(PSet.boids) the answer is None!!!
Some ideas?
Thanks again !!

The code I pasted at pasteall already breaks at line 83 or something, the rest of the code isn’t interesting for your problem. (yet)

but i agree with your finding… if you comment out from line 84 onwards like

and then to check, do:

>>> em = bpy.context.object
>>> PSet = em.particle_systems['ParticleSystem'].settings
>>> PSet.boids["ParticleSettings"].boids

while the very last print statement in the Script when run from Text Editor says None and not[“ParticleSettings”].boids

sorry can’t help :frowning:

Hi again zeffii !
yeah you find the problem !!!

you might try setting up a particle_system first, then assigning it to the emitter object…
test_particles =["TestSystem"]
test_particles.show_velocity=True = test_particles

i’ll have a look at this later [noparse]:)[/noparse]

even this doesn’t show it…

maybe there’s a update switch somewhere…

simply adding scn.update()!!!
thanks !!!

But how can i add a Goal rule???
i don’t konw how to do that in python??