set value by using function()

   4603   5   2
User Avatar
Member
58 posts
Joined: July 2005
Offline
how to set/change the value of any OP parameter (for example : scale,tranlation of xform1) by using expression? in this case , i don't want to type the expression in the input box itself. what i want to do is creating a function that's executed by other event and this function contain some scripts that look probably like this :
set ch(“myOPparam”)= 123;
which i tried and didn't work.

clay~
User Avatar
Member
2199 posts
Joined: July 2005
Online
This is fairly simple as long as you don't want to set keyframes, then it gets a bit more involved.

for example to set the x value in the transform for the object “model” type the following in a textport pane:

opparm /obj/model t (123 0 0)

or for your own param

opparm yourobject/yoursop yourparam (123)

let me know if you need to key frame it too.

Si
The trick is finding just the right hammer for every screw
User Avatar
Member
58 posts
Joined: July 2005
Offline
thanx Simon,
i don't want to animate it this time. Is there's any expression that's similar to this hscript (opparm) ?

clay~
User Avatar
Member
2199 posts
Joined: July 2005
Online
Not sure quite what you are asking here, do you want an expression that you put in a channel that evalutates and then removes itself :?
The trick is finding just the right hammer for every screw
User Avatar
Member
58 posts
Joined: July 2005
Offline
in my case:
i created a new geo type, in param–> callback , i put a function like this:
`myfunction(xxx)`. ‘myfunction()’ is a custom expression that i created .
in this function, i put some ‘opparm’ by using -execute:
execute(“opparm bla bla”);
so i think it would be simple if there's an expression that can do the same thing like ‘opparm’, which mean i don't have to use ‘execute()’ to call the opparm.

i know i can make a hscript (already did and thanx about that ‘opparm’ anyway) and put it in script directory, but i just want practicing to handle a similar task using expression.

clay~
User Avatar
Member
7715 posts
Joined: July 2005
Offline
There's no way. The expression language is generally meant to compute and return values.
  • Quick Links