Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Videos

Downloads

  • Arrays_04.hip

Missing 1 full-res photo, 1 file, as this post has not yet been imported.

Content

The last basic control structure we'll be discussing is ubiquitous when writing code: it is the if-statement.

In this tutorial we'll use it to improve our simple point connector setup to take into account a minimum point distance and to only connect points in a rectangular fashion.

Files

Previews only

VEX 101 pt. 12: If-Statements

Comments

Philipp Welsing

Finally took the dive into this series. SO good and rewarding, thank you.

Florian

Hi Mo, thanks a lot! One question, where can I find a list of all these commands you're using? (ie : &&, ==, || etc..)

Florian

Here they are! thanks Mo.

Doca Mladenovic

It would be really nice if you could name scene files as the lessons are named. Other than that, great work again!

Acroyear

Fantastic, I have a small question: When you used the delete vex code, some times I have a complex setup with a foreach looping over points and deleting them using nearpoint for example, which depends on an input geo, and my problem is when it calls the geo it uses the original one with all the points not the result of my foreach with deleted points. So is there a way to make nearpoints or any function that depends on an input geo to just grab it the first time and then iterate on it.

entagma

Hi Vismo, foreach looping over points in VEX sounds like a slow'ish solution. In essence the pointwrangle does the same thing by default (iterating over individual points). So if you'd like to reapply what a point wrangle does to a geo over and over again, it'd be more straightforward to use the for-loop with feedback: <a href="https://www.dropbox.com/s/a1xcgavrl0qndq7/for_loop_feedback_01.hip?dl=1" rel="nofollow noopener" target="_blank">https://www.dropbox.com/s/a1xcgavrl0qndq7/for_loop_feedback_01.hip?dl=1</a> If there's any chance you can build your setup to use the point wrangle directly instead of the foreach loop - I highly recommend doing it. It's gonna speed up your setup by an order of amgnitude. Cheers, Mo