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
111
S
41
G
20
Posts: 1,586
Reputation: 19,046

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
378
S
220
G
84
Posts: 23,871
Reputation: 188,227

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
111
S
41
G
20
Posts: 1,586
Reputation: 19,046

Post » Mon Sep 07, 2009 8:33 am

That's where Intellisense and 'Go to definition' are your friend :)
Scirra Founder
B
378
S
220
G
84
Posts: 23,871
Reputation: 188,227


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests