[Solved]How do I add setColor effect?

Just started using Construct 2? Post your questions here

Post » Sun Jul 12, 2015 4:08 pm

Hi everyone,

Just started using Construct 2. I am following the tutorial/sample as given here ==> [url]https://www.scirra.com/forum/viewtopic.php?f=146&t=76577&p=633697[url]

Basically I want to change my sprite to random colors when they are created. When I want to add the effect parameter on my project, I get the following:

Image

How do I add the setColor effect?
Last edited by mrneko on Wed Jul 15, 2015 10:39 am, edited 1 time in total.
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Sun Jul 12, 2015 4:17 pm

You can't (I think) put code in here, just specific values. What you want is <thingummy> OnCreated => set fx parameter (0) to floor(random(0,100)) and repeat for 2 and 3.
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Mon Jul 13, 2015 5:42 pm

mrneko wrote:Hi everyone,

Just started using Construct 2. I am following the tutorial/sample as given here ==> [url]https://www.scirra.com/forum/viewtopic.php?f=146&t=76577&p=633697[url]

Basically I want to change my sprite to random colors when they are created. When I want to add the effect parameter on my project, I get the following:

Image

How do I add the setColor effect?


- First the SPRITE must have the EFFECT added to it -
  • Sprite - On created
  • Set effect parameter (Choose SetColor)
  • Parameter index (Choose the one you wanna change) "usually 1,2,3,4 and so on"
  • Value = Int(Random(Value)) "This will use a straight value like 4,6,1,80 and so on"

Another way you could do it was adding the "Tint" effect. (value 100,100,100 is the standard color) and simply doing the same as above. This effect just comes with C2 and do not need to be added into it.
B
19
S
10
G
2
Posts: 161
Reputation: 3,355

Post » Tue Jul 14, 2015 2:21 am

Thanks CrudeWall. Got it!
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Tue Jul 14, 2015 8:17 am

mrneko wrote:Thanks CrudeWall. Got it!


Np.

Remember to set the topic as [Solved] if one of the answers worked for you. ;)
B
19
S
10
G
2
Posts: 161
Reputation: 3,355


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests