5DNick Posted January 22 Share Posted January 22 Dear ODForcers, I have this inside a popcurveforce inside a DOPNET and am attempting to make each packed prim start moving (by this force) at a random time up to 50 frames (my scene starts at 1001) float random = rand(@ptnum); float framestart = (random * 50) + 1000; if (@Frame < framestart) { airresist = 0; } else { airresist = 15; } Can you see what is wrong here, it doesn't seem to work? I have left out the .hip because everything else works just not my code. Thanks Nick Quote Link to comment Share on other sites More sharing options...
RobiDoes3d Posted January 22 Share Posted January 22 I pasted your code into my hip file and it works. Depending on your setup, you can try 1. Use the @id attribute instead of @ptnum (in case you have particles dying). 2. make sure your time slider is in between 1000-1200 If that doesn't work you can group the particles you want to advect and then use that group in the popcurveforce. To do this: 1. popgroup DOP - set the group name to followCurve: paste this into the wex code float random = rand(@id); float framestart = (random * 50) + 1000; if (@Frame > framestart) ingroup = 1; 2. popcurvefirce DOP - turn on group and set it to followCurve; set air resistance to 15 Best regards, Robert vexFollowCurve_fix.hip Quote Link to comment Share on other sites More sharing options...
RobiDoes3d Posted January 22 Share Posted January 22 Also, the popcurveforce DOP has 2 text boxes for vex code. Make sure you put yours in the upper one. If you put it in the lower one, it wont work Quote Link to comment Share on other sites More sharing options...
Atom Posted January 22 Share Posted January 22 Sometimes it's a little clearer to just use a fit01 in this case to specify the range. integer frame_start = int(fit01(rand(@id),240,480)); // Frame range to possibly start on. 1 Quote Link to comment Share on other sites More sharing options...
5DNick Posted January 24 Author Share Posted January 24 OK! Thanks guys. The problem was NOT my code it turned out, but that I also had a POP VOP doing something, so it therefor appeared they were still all moving from the beginning, when that curveforce was not actually acting until commanded. Thanks anyway =) 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.