Pseudo code:
Determine number of particles to be emitted
Initialize ICE attribute lookup table with flipped state status
set to false for each index
Birth particles
Identify and assign IDs to particle pairs (odd/even pairs, for
example)
For each particle in the cloud:
Particle does something to trigger event
Event code executes looking up particle's ID,
paired particle ID, and ICE Attribute recording flipped status
If ICE attribute says particle
states already flipped
Exit event
Else
Flip particle
states
Record flipped
status in ICE attribute
Exit event
From: [email protected]
[mailto:[email protected]] On Behalf Of Matt Lind
Sent: Tuesday, September 18, 2012 6:24 PM
To: [email protected]
Subject: RE: ICE Setting a Switch for Random Pairs?
Actually, I probably don't need to know.
Usually when you have this situation you need to involve a neutral 3rd party to
manage the states.
One possible solution is to implement an event based trigger to look at the
states of each particle in the pair and flip them if necessary. This event
would have to consult an ICE Attribute or some other external piece of data
which records whether the particles have been modified before or not so the
event doesn't accidentally get caught in a loop. The name of the ICE attribute
(or index in a table of some sort) could be stored in the particles.
Matt
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Matt Lind
Sent: Tuesday, September 18, 2012 6:18 PM
To: [email protected]<mailto:[email protected]>
Subject: RE: ICE Setting a Switch for Random Pairs?
Should I assume the setting for an individual particle is being set based on an
event and cannot be determined at time of emission/birth?
Matt
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Bradley Gabe
Sent: Tuesday, September 18, 2012 6:15 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: ICE Setting a Switch for Random Pairs?
Bi-directional, and I only need to set it once. If one particle is True, its
partner is False.
On Tue, Sep 18, 2012 at 8:09 PM, Matt Lind
<[email protected]<mailto:[email protected]>> wrote:
Altogether now: "I have an ICE tree where each particle is paired with a second
particle, and the second with the first, both by ID attribute."
OK, now onto your problem.
What kind of relationship are you trying to set up? Master/Slave or
bi-directional like spooky action?
Matt
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
On Behalf Of Bradley Gabe
Sent: Tuesday, September 18, 2012 6:04 PM
To: [email protected]<mailto:[email protected]>
Subject: ICE Setting a Switch for Random Pairs?
Let's say I have an ICE tree where each particle is paired with a second
particle, and the second with the first, both by ID attribute.
I need to build a logic structure where, if one particle is True, its paired
particle is False. And it needs to be randomly distributed through the cloud.
Does anyone have a logic solution for this, preferably one that does not
require a repeat loop?
-B