Page 1 of 2

changing colors

PostPosted: Wed Jun 27, 2007 2:08 pm
by delsol456
I can't figure out how to make a button that, when clicked, changes the color of another actor. Everytime that I try it changes the color of the button. Someone please help.

PostPosted: Wed Jun 27, 2007 2:21 pm
by Oman
wats your code?

PostPosted: Wed Jun 27, 2007 2:28 pm
by delsol456
paintcolor;r=220; g=0; b=0;

i've tried a couple of things but with the same result.

btw this is in script editor for mouse button down on the button that is supposed to change the color of the paint

PostPosted: Wed Jun 27, 2007 2:31 pm
by pixelpoop
actorname.r=220;

PostPosted: Wed Jun 27, 2007 2:34 pm
by delsol456
thank you

PostPosted: Fri Jul 06, 2007 6:09 pm
by delsol456
i had assumed that r=220 would make red, but i was wrong. it turned out cyan. how do i make red.

PostPosted: Fri Jul 06, 2007 6:34 pm
by Rux
Red is,


Code: Select all
g = 1;
b = 1;




Blue is
Code: Select all
g = 1;
r = 1;


Green is
Code: Select all
b = 1;
r = 1;


:D :D :D

There are many more colors that can be scripted, even random ones.

Just put
Code: Select all
b = rand(your value);
g = rand(your value);
r = rand(your value);
 

:D

PostPosted: Fri Jul 06, 2007 6:48 pm
by delsol456
thanks



p.s. club penguin rocks

PostPosted: Fri Jul 06, 2007 6:53 pm
by Rux
(You are PMed by me.)

PostPosted: Sat Aug 11, 2007 11:25 pm
by florafinn@yahoo.com
ok so where do you type your actorname,r=220
and do you have to do anything before it??

PostPosted: Sat Aug 11, 2007 11:29 pm
by pixelpoop
you can put it in any event where you want the color change to happen. but it should look like this:
actorname.r=220;

not this:
actorname,r=220

PostPosted: Sun Aug 12, 2007 12:07 am
by florafinn@yahoo.com
but where do i type actorname.r=220

PostPosted: Sun Aug 12, 2007 12:08 am
by florafinn@yahoo.com
oh and what event :?:
Sorry I am new to this.

PostPosted: Sun Aug 12, 2007 12:37 am
by pixelpoop
It depends on what you are trying to do.

If you are new to GE you should go through all the Help Menu tutorials and try and recreate what they show you how to do.

PostPosted: Sun Aug 12, 2007 12:38 am
by d-soldier
For your situation, it would be an event on the "button" actor, a mouse-button-down event.