mrcoolmen Posted June 7, 2015 Share Posted June 7, 2015 Hey guys, I have a question about pop wrangle if else statement. I'm trying to record the frame number that when the particle enter a group. In the old pop using the attribute node if($ENTER_GROUP == -1, $F, $ENTER_GROUP) it works however im trying the new pop n with its POP wrangle it kind of not working. Im not really sure what i did wrong i@enter_group = -1; if (@enter_group == -1) { @enter_group = @Frame; } else { @enter_group = @enter_group; } Thanks u guys for your help in advance Quote Link to comment Share on other sites More sharing options...
anim Posted June 7, 2015 Share Posted June 7, 2015 (edited) here is the example but essentially the code is: // this code is run only on particles in desired group float @enter_groupf = -1; // default value for initialization of enter group frame (if you sim in negative frames, make this lower than your start frame) if (f@enter_groupf == -1) //if current value is still at default { f@enter_groupf = @Frame; // set it to current floating frame } pop_enter_group_frame.hip Edited June 7, 2015 by anim Quote Link to comment Share on other sites More sharing options...
mrcoolmen Posted June 7, 2015 Author Share Posted June 7, 2015 hey anim, Its exactly what i need, many thanks. Kevin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.