Skip to main content
New Participant
September 30, 2022
Answered

Sequence of ''if/else'' nodes (pls help)

  • September 30, 2022
  • 1 reply
  • 494 views

Hello! this if my first post on this community so pls be gentle ^^

Im trying to link the ''size'' variable of a shape node to the ''tile(x,y)'' variable of a tile generator node.

The tile generator it's clamped (1-4)

So i need a node tree like....

If tile number value is 1---- size value---- (0.68) 

If tile number value is 2---- size value---- (0.32) 

If tile number value is 3---- size value---- (0.2) 

If tile number value is 4---- size value---- (0.14) for example

But i dont find a simple way to do this

PLS HELP ME! ^^ 

Thx in advance!

This topic has been closed for replies.
Correct answer davescm

In the example below I made a graph input called Tile (Integer, clamped at 1 to 4 step 1)

In the Tile Generator node I set the X amount and Y amount parameters to use that input.

In the shape node I added the function below for the size

 

 

I've attached the sbs

Dave

1 reply

davescm
Community Expert
davescmCommunity ExpertCorrect answer
Community Expert
October 1, 2022

In the example below I made a graph input called Tile (Integer, clamped at 1 to 4 step 1)

In the Tile Generator node I set the X amount and Y amount parameters to use that input.

In the shape node I added the function below for the size

 

 

I've attached the sbs

Dave

New Participant
October 2, 2022

Hello Dave! this works like a charm! 

thank you so much!

davescm
Community Expert
Community Expert
October 2, 2022

When I saw your reply and looked again at my answer, I noticed an error and I've updated it slightly. I had left an unused node lying around and connected the last if/then/else differently to the others. Both versions work but this revised version may be easier to adapt and extend as required.

 

Dave