How do I finish this widget

I am creating a widget if it is under 40 I want 4 variables to change their number if it’s above or below a certain number I want those 4 variables to switch to another set of numbers I don’t know where to go after the first if and do I have to reset the DB2P number to 0 after every entry?
Thank you


Its just nesting your branches.

just drag off of the false of you first branch, add another branch, make a new condition to test, simple.

I would do this backwards though and say

DB2P > 120 then → Set
else DB2P > 81 then → Set
else DB2P > 41 then → Set

1 Like

If your range will always be 40, you could do something like floor((InValue - 1) / 40) and pass the resulting int to a switch node.

Results would be:

  • (40-1)/40 = 0
  • (41-1)/40 = 1
  • (80-1)/40 = 1
  • (81-1)/40 = 2
1 Like

@pezzott1 I like that. %40

Thank you for you help guys, nesting it was the way to go with this…this is what it looks like…do u see something other than using nested branches I could have done this.

@Rumzie
@pezzott1

I link using modulus approach is actually more straightforward and scalable with blueprints as @pezzott1 suggested.

so you would do DB2P % 40 then the output of that is a switch.

I like it!

I’m curious to see @pezzott1 solution to this. This is what I cam up with.

SeperationValue = 10
Range = 40
SomeNumber = DB2P

Here you go:
ModMap

2 Likes

Nice!