changing colors

Game Editor comments and discussion.

changing colors

Postby delsol456 » Wed Jun 27, 2007 2:08 pm

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.
delsol456
 
Posts: 10
Joined: Fri Jun 01, 2007 11:15 pm
Score: 0 Give a positive score

Postby Oman » Wed Jun 27, 2007 2:21 pm

wats your code?
"Beyond a wholesome discipline, be gentle with yourself." - Max Ehrmann
User avatar
Oman
 
Posts: 268
Joined: Tue Oct 31, 2006 4:00 am
Location: Somewhere out there...
Score: 6 Give a positive score

Postby delsol456 » Wed Jun 27, 2007 2:28 pm

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
delsol456
 
Posts: 10
Joined: Fri Jun 01, 2007 11:15 pm
Score: 0 Give a positive score

Postby pixelpoop » Wed Jun 27, 2007 2:31 pm

actorname.r=220;
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby delsol456 » Wed Jun 27, 2007 2:34 pm

thank you
delsol456
 
Posts: 10
Joined: Fri Jun 01, 2007 11:15 pm
Score: 0 Give a positive score

Postby delsol456 » Fri Jul 06, 2007 6:09 pm

i had assumed that r=220 would make red, but i was wrong. it turned out cyan. how do i make red.
delsol456
 
Posts: 10
Joined: Fri Jun 01, 2007 11:15 pm
Score: 0 Give a positive score

Postby Rux » Fri Jul 06, 2007 6:34 pm

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
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Postby delsol456 » Fri Jul 06, 2007 6:48 pm

thanks



p.s. club penguin rocks
delsol456
 
Posts: 10
Joined: Fri Jun 01, 2007 11:15 pm
Score: 0 Give a positive score

Postby Rux » Fri Jul 06, 2007 6:53 pm

(You are PMed by me.)
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Postby florafinn@yahoo.com » Sat Aug 11, 2007 11:25 pm

ok so where do you type your actorname,r=220
and do you have to do anything before it??
User avatar
florafinn@yahoo.com
 
Posts: 18
Joined: Sat Aug 11, 2007 7:17 pm
Score: 0 Give a positive score

Postby pixelpoop » Sat Aug 11, 2007 11:29 pm

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
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby florafinn@yahoo.com » Sun Aug 12, 2007 12:07 am

but where do i type actorname.r=220
User avatar
florafinn@yahoo.com
 
Posts: 18
Joined: Sat Aug 11, 2007 7:17 pm
Score: 0 Give a positive score

Postby florafinn@yahoo.com » Sun Aug 12, 2007 12:08 am

oh and what event :?:
Sorry I am new to this.
User avatar
florafinn@yahoo.com
 
Posts: 18
Joined: Sat Aug 11, 2007 7:17 pm
Score: 0 Give a positive score

Postby pixelpoop » Sun Aug 12, 2007 12:37 am

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.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby d-soldier » Sun Aug 12, 2007 12:38 am

For your situation, it would be an event on the "button" actor, a mouse-button-down event.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron