is it possible to use an object param in an expression

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Sun Jul 05, 2009 5:11 pm

can you use an object param in an expression?
I did, but I don't know how to use it in construct
I tried (objectname.UID) ("object name") and (objectname)
I'm going to make it take an int param and use the UID to find the object for now
but I'm curious if it's possible anyway

also, what's selectf and selectallf?
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun Jul 05, 2009 6:29 pm

Object parameters aren't supported in expressions. You could use a string of its name or the UID as you suggest though. However, the rest of Construct never does that, so it would be unusual. It might be better to have a 'set object' action followed by expressions with no parameters instead.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Tue Jul 07, 2009 11:36 am

Yes, current standard is to set an object via an action if it is to be used by other actions/conditions/expressions. I wouldn't advise an object name parameter except for very specific uses.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests