Jump to content

If / Else group - VEX


jackassol

Recommended Posts

I'd like to know the best way to use If Else type statements in Vex code.
 

What I wanted to achieve:

if( in the group name "inside") {
    @stiffness = 1;
}

else ( not in side the group name "inside") {
    @stiffness = 1000;
}

 

What's the correct vex code for this function Vex?

 

I don't get this working.

 

best

 

jack

 

 

 

 

Link to comment
Share on other sites

while there are functions like inprimgroup() or inpointgroup(), whenever possible I like to use the shorthand @group_groupname syntax. So if you run over points and are looking for a pointgroup then your code would be

if(@group_inside)
{
  	f@stiffness = 1;
}
else
{
  	f@stiffness = 1000;
}

 

Edited by 3dome
  • Like 1
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...