Adding a counter to a parameter interface

   2527   2   1
User Avatar
Member
55 posts
Joined: March 2015
Offline
Hi

When adding an integer or float to a parameter interface is it possible to make it display a value?

For example I have a null node and I add a float (or an integer) parameter to it, can I say, somehow, display the result of 50+23?
Or even better, display the result of the sum of these two channels?

Thanks
https://vimeo.com/user43100796 [vimeo.com]
User Avatar
Member
1743 posts
Joined: March 2012
Offline
You can enter an expression into the channel and set it to display as a value instead of the expression by clicking on the parameter name. A fancier trick is to add a Label parameter, hide the main label for it, and in the first entry in the big stack of text boxes in the Parameter Interface dialog (all but the first are greyed out by default), you can enter an expression in backticks, e.g. `ch(“asdf0”)+ch(“asdf1”)` or `details(“inner_node_0”,“string_attrib_name”)`.

That lets you display informative messages, particularly if you're making assets that may have some error checking, and you want to notify the user what happened when things go wrong. I used it for my equation solver asset on Orbolt to notify what it's treating as unknowns to solve for and what it couldn't parse correctly.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
55 posts
Joined: March 2015
Offline
Ok thanks
https://vimeo.com/user43100796 [vimeo.com]
  • Quick Links