Itoo Software Forum

Author Topic: if / conditions  (Read 72 times)

RB2300

  • Newbie
  • *
  • Posts: 16
    • DEVconstruction
if / conditions
« on: November 17, 2020, 09:14:45 AM »
Please I have one simple quick question clarify if solution exist...
I am trying use IF condition in advanced way... please is it possible somehow define IF in way of

(if mat_id == 1 ) { select randomize1} elseif ( mat_id == 2 ) { select randomize2} elseif (mat_id == 3) { ... }, .. ,.. ,...

best regards pablo

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2800
    • iToo
Re: if / conditions
« Reply #1 on: November 17, 2020, 09:23:07 AM »
Yes, RC can do it. Use selector node and export index. Wire arithmetic operator and use expression like this:

Code: [Select]
return
if(XSplineMatID==1,1,
if(XSplineMatID==2,2,
if(XSplineMatID==3,3,
if(XSplineMatID==4,4,5
))));

Rokas
iToo Software

RB2300

  • Newbie
  • *
  • Posts: 16
    • DEVconstruction
Re: if / conditions
« Reply #2 on: November 17, 2020, 09:25:59 AM »
Thanks sir, I really appreciate it. I wish you really nice day. Thanks again