Function Object

New releases and general discussions.

Post » Sun Nov 11, 2007 3:09 pm

I think I may just be having a mind blank, but I can't for the life of me work out how to get the parameter values of my Function I'm working on.

Eg. Function.Atan2(1,2)

I know the parameters are there, using Function.NumParams results in '2'. But I just can't seem to figure out how to get to them.

Excuse the foolishness, and thanks in advance for your reply. :D

EDIT: I think its more a matter of not knowing how to use Function.Param. Thanks again.
B
2
S
2
G
5
Posts: 108
Reputation: 1,866

Post » Sun Nov 11, 2007 4:48 pm

It was a bug!

You get parameters using Function.Param(1), Function.Param(2) etc. (it's a 1-based index like everything else in Construct). However I messed up the definition of the expression in the SDK and the parameters dialog would have rejected that. The fixed version is on the CVS. Sorry to confuse you :)

FYI, you can use Function(1), Function(2) as a shortcut for Function.Param, and this should work in the version you've got too.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests