I have been messing with this runtime code for a while now so I am hoping someone here can help figure this out with me.
I am running a particle simulation that uses a goal of “1” and jumps from one curve to the next to write out a word in particles. I am trying to use this set of code in order to process the iterations. However, right now I have to key the goals on and off when the goalU hits 1.
What I want to do is automatically switch the goal Active off or on given what letter it should be on. However every time the total is processed to 1 it resets to 0 when it should add 1 to its total. It will only be 1 for the one frame that the goalU is above 1 then resets.
I hope that makes sense.
$go = primary_particleShape.goalU;
int $total = 0;
primary_particleShape.goalU += .01;
if(primary_particleShape.goalU > 1){
primary_particleShape.goalU = 0;
$total += 1;
}
print ($go + "
");
print ($total + "
");
:::PLAYBLAST :::
Playblast