Anyway, here's what I've got going so far that I needa figure out how to make work. I do need the if statement I think.
The idea behind this script is I'm trying to put a step inbetween ageNormalized out to the array mapper in a curve flow. I want to have more control over the speed of the flow. So the plan is take the current age normalized of the particle when it starts. Since age normalized is just taking the total range of the lifespan and converting that of a range between one and 0, the hope I have here is I can make a slider for my own lifespan. We start with a number for the initial age normalized (might start with a cached particle position) and then take that age and add on 1/my own lifespan * 30 frames a second, so I get the step amount it takes every frame. There I can continually add that on every frame to the initial age normalized I have. That way I can change my speed and it just adjusts the amount it steps every frame.
Otherwise, if I use the default method that's already set up for me, I change the lifespan, it changes the whole ratio for age normalized, and particles can move backwards, which I don't want. Hope that makes some sense to somebody.
float $birthFrame = frame;
float $currentAge = `getAttr Flow_particleShape.ageNormalized`;
float $timeStep = 1 / (locator1.slider * 30);
if (frame == $birthFrame )
$reroutedAge = $currentAge;
$reroutedAge += $currentAge + $timeStep;
arrayMapper2.arrayMapper2.vCoordPP = $reroutedAge;
Ok, I just tried making it using userScalarPP attributes I made, and I don't seem to be able to get arrays out of it. Or into it.