color changing

About advanced scenes, and the Thyme scripting language used in Algodoo.

color changing

Postby Username? » Sun May 09, 2010 9:09 pm

I've remember a way to change only one color like red green blue or alpha.
It was like
e.this.color(0) = 1 for red
e.this.color(1) = 1 for green
e.this.color(2) = 1 for blue
e.this.color(3) = 1 for alpha

But that doesn't work
Does anybody know how to do that? :?:

and does it work with other arrays like vel, too?
Check my most scripted scene
Code: Select all
       /^°>#
____.<=/`°`    #<°^==>._____
     ``         ´´  ´´
User avatar
Username?
 
Posts: 65
Joined: Sun Sep 20, 2009 8:06 pm

Re: color changing

Postby KarateBrot » Sun May 09, 2010 11:08 pm

color = [blabla, e.this.color(1), e.this.color(2), e.this.color(3)] for red etc...
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: color changing

Postby Matten » Mon May 10, 2010 1:10 pm

I use color := [1,0,0,1] for red, color := [1,1,1,1] for blue, etc.
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
User avatar
Matten
 
Posts: 435
Joined: Mon Apr 05, 2010 2:03 pm
Location: The Netherlands

Re: color changing

Postby RicH » Mon May 10, 2010 3:05 pm

I believe he wants to edit only one of the values in the color(RGBA).
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
User avatar
RicH
[Funniest Person 2010]
 
Posts: 2043
Joined: Tue Sep 01, 2009 9:01 am

Re: color changing

Postby Username? » Mon May 10, 2010 4:13 pm

Karatebrot is right. thx
Matten wrote:I use color := [1,0,0,1] for red, color := [1,1,1,1] for blue, etc.

1,1,1,1 is withe -.-
Check my most scripted scene
Code: Select all
       /^°>#
____.<=/`°`    #<°^==>._____
     ``         ´´  ´´
User avatar
Username?
 
Posts: 65
Joined: Sun Sep 20, 2009 8:06 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests

cron