Pages

Tuesday, August 18, 2009

Wiring Tricks

I just found an interesting question in the forum:

I have wired visibility from Box06 to Point01 that has an attribute holder or "Param1" which has spinner integer with value ranging from 0 to 15. Now I want Box06 visibility only to to be 1.0 when Param1 value is at 6, otherwise if its on 2, 4, 1, 12, or whatever in that range other than 6 then Box01 visibility is at 0.0 value. What should I write in the expression after I have wired these two. Or are there any other ways to go around this?

Well,... If looking for another way, you can use
Boolean with checkbox instead of spinner controll.



Then if checked visibility will be 1 and 0 if uncheked.
In this case do not need to write any expression.



But if you get value 6 from other event or script
and need to wire by spinner, then write:

if Param2 == 6 then 0 else 1


(in the screenshot I zoomed a little expression to see more clearly)

No comments:

Post a Comment

Thanks for your comment