View Full Version : PFlow question
04-02-2004, 02:36 PM
I am setting up a particle simulation. I would like to use particles to represent ships flying in space. I would like 2 sets of ships. Right now they are instances geometry(spheres and boxes). I would like the sphere particles, when coming close to the box particles to change direction and chase the box particles. Using variation that they don't always chase or they break off and chase others. I have tried using find target, but you cant use another particle system as the target.
If you need more clarification, please let me know and I will try to explain further. Any help would be greatly appreciated.
04-02-2004, 07:04 PM
I went to bobo and used a variation of his "Ride the Flow" script.
I attached a find target icon from source 1 to a single particle from source 2.
It worked great. but now i am having trouble adding a second particle to source 2.
psource1 has 10 particles. a "split amount" of every 3rd particle to a new event.
This new Event has a Find Target...."Find Target 01"
psource2 has 1 particle and a script operator connecting the "Find Target 01" to that single particle.
The following is the script:
n ChannelsUsed pCont do
pCont.useTM = true
on Proceed pCont do
$'Find Target 01'.transform = pCont.particleTM
The question now is how to take the leftover particles to a new find target event and that find target icon attached to a second particle from psource 2.
Any help would be appreciated.
04-02-2004, 11:41 PM
I'm assuming that you have chosen to use particles because hand animating would be too time consuming on a number of ships?
04-03-2004, 12:11 AM
That is exactly it. I also want some element of randomness.
04-03-2004, 04:45 AM
You need a 'for loop' which cycles through all the particles one by one and applies a property or whatever it is you want to do.
Something like this:
on Proceed pCont do
count = pCont.NumParticles()
for i in 1 to count do
PLACE YOUR SCRIPT IN HERE
I'm not a maxscript dude really... so I can't say if I'm totally right.
04-03-2004, 03:35 PM
thanks. i hard coded a find target script last night. It works. as particles split off they chase new targets. I will try a loop next.
thanks for your reply.
01-17-2006, 10:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.