THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/05/2012 at 09:53, xxxxxxxx wrote:
Hello to all
I have problem with understanding of how to catch/detect and kill at n-collision tp(id).
scene(from my colleague) - link
and code(at tag) :
import c4d
from c4d.modules import thinkingparticles as tp
def main() :
curframe = doc.GetTime().GetFrame(doc.GetFps())
N = tp.NumParticles()
ids = range(N)
if curframe == 0 :
ids = range(N)
life = [c4d.BaseTime(0.0)]*N
map(tp.SetLife,ids,life)
else :
ids = range(N)
for i in ids :
if tp.Alive(i) :
col = tp.SetCollision(i, 10)
print col
if col :
ids = range(N)
life = [c4d.BaseTime(0.0)]*N
map(tp.SetLife,ids,life)