Setting color filter through plugin

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

Post » Mon Sep 07, 2009 12:22 am

How is one supposed to set the color filter of an object through a plugin? I know that I'm supposed to set:

[code:3vv376zu]Object->info.pInfo->filter[/code:3vv376zu]
But how do I set the value for this? Using the RGB() function throws an error at me, so I'm at a loss for what to do. :?

EDIT: Also, it doesn't look like I can set the filter through a parameter from an action. That throws a fit as well.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Mon Sep 07, 2009 12:34 am

Set it to a cr::color(a, r, g, b). Notice that the variable you mentioned is of type cr::color.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Mon Sep 07, 2009 1:18 am

Thanks. :) I noticed that it was cr::color, I just didn't know how it worked, or where the values went in.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Mon Sep 07, 2009 8:33 am

That's where Intellisense and 'Go to definition' are your friend :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests