Jump to content

VEXpression error


avak

Recommended Posts

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 by Rudinie
Link to comment
Share on other sites

 

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 by avak
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...