This is pretty much a continuation of this thread:
http://forums.cgsociety.org/showthread.php?t=731693
I’m using almost exactly the same method as irwit, except I’m using a script operator because I only want to apply the script to the first event and use those particles to spawn trails.
Strangely, the script works fine when I scrub through the timeline, but when I play forward the particles don’t move, and when I render I see absolutely nothing happening. I’m guessing it’s not getting the vertices from the proper frame despite the “at time”, but I have no clue what I’m doing wrong. Anyone have an idea?
Here’s my birth script (works fine, just posting for the sake of completeness):
on ChannelsUsed pCont do
(
pCont.usePosition = true
)
on Init pCont do
(
global emitterObj = $emitterLine
)
on Proceed pCont do
(
t = pCont.getTimeEnd()
if emitterObj != undefined do
(
if (t < -99) do
(
for i = 1 to emitterObj.numVerts do
(
pCont.AddParticle()
pCont.particleIndex = pCont.NumParticles()
pCont.particlePosition = polyop.getVert emitterObj i node: nullBox
)
)
)
)
on Release pCont do
(
)
And here’s the script operator:
on ChannelsUsed pCont do
(
pCont.usePosition = true
)
on Init pCont do
(
)
on Proceed pCont do
(
count = pCont.NumParticles()
lockObj = $emitterLine
for p in 1 to count do
(
pCont.particleIndex = p
pos = at time pCont.particleAge polyop.getVert lockObj p node: nullBox
pCont.particlePosition = pos
)
)
on Release pCont do
(
)
If I could I’d use lock/bond from pf toolbox 1 but I’m short on cash at the moment and really can’t afford it, plus it seems like overkill since it’s just 12 verts I need to lock on to.
I was under (obviously the wrong impression) that all time related needed the .usetime. It totally makes sense that it is only channel related.