variable change within Funcitons
This example was made unique for this post.
I want to change out a variable within a function and it does not seem to work....
How would I got about changing out the variable so when the function is run it evaluates as well as stores the value into the corresponding variable.
local posX = undefined local posY = undefined local posZ = undefined fn fnCopy dir var = ( if selection.count == 1 do ( obj = selection[1] var = obj.pos[dir] ) ) fnCopy 1 posX fnCopy 2 posY fnCopy 3 posZ
Comments
I'll have to look it up
Thank you for the quick response Anubis,
You're great at quickly responding to questions with solutions.
I'll have to look up the by-referencing.
I'm assuming that is what it's called in the help file as well.
I'll post my script after I make it to show you what I was after. I'd love to get your input on ways that you would possibly change about it.
Thanks
JokerMartini
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
using "by-reference" variable
example:
but as may guess you'll need 3 ref-arguments to put out to 3 variable outside the function, i.e. something like:
my recent MAXScripts RSS (archive here)