avak Posted April 4, 2014 Share Posted April 4, 2014 Is simple but I get error by putting this VEXpression in pop property node (H13) : pscale = if (@age>2 , 0.02 ,0.5 ); am I writing it wrongly? file is attached, Thanks Quote Link to comment Share on other sites More sharing options...
avak Posted April 4, 2014 Author Share Posted April 4, 2014 I think I did attached file but it didn't, sorry guys I don't know how to attach file here Quote Link to comment Share on other sites More sharing options...
Rudinie Posted April 4, 2014 Share Posted April 4, 2014 (edited) Use a Pop wrangle, and one of the examples from a point wrangle to get the idea of the if then else statement: int condition = (@P.x > 0) ? 1 : 0; // short form if() test @Cd = set(condition, 0, 0); // write condition into red color Then edit that into something like this: int condition = (@age > 2) ? 1 : 0; // short form if() test f@pScale = set(condition, 0.02, 0.5); // write condition into pScale Edited April 4, 2014 by Rudinie Quote Link to comment Share on other sites More sharing options...
avak Posted April 4, 2014 Author Share Posted April 4, 2014 (edited) Use a Pop wrangle, and one of the examples from a point wrangle to get the idea of the if then else statement: int condition = (@P.x > 0) ? 1 : 0; // short form if() test @Cd = set(condition, 0, 0); // write condition into red color Then edit that into something like this: int condition = (@age > 2) ? 1 : 0; // short form if() test f@pScale = set(condition, 0.02, 0.5); // write condition into pScale Thanks for the tip, I placed these expression inside popproperty node and it worked, : either: float newvalue = (@age>3.5) ?2 : 0.5; pscale = set(newvalue); or simply pscale = (@age>3.5) ?2 : 0.5; both worked nicely, Thanks Edited April 4, 2014 by avak 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.