Change Color on a default actor and change it with another actor.
DarkUndeadSpawn
Member Posts: 64
Hello,
I been seeing lots of people showing that they were having quite a bit of trouble with color value with one actor to another.
Note: The color will be only changed once but will not mix.
Create 3 global integers
Call them change color, change color 2, and change color 3.
Now create 4 actors?
Leave the default actor as default
Now name the other actors. Color Red, Color Blue, Color Green.
Now go in the color red actor and add
when touch is pressed
Do
Change attribute
set game.change color to: self.color.red
Now go in the color blue actor and add
when touch is pressed
Do
Change attribute
set game.change color 2 to: self.color.blue
then go in color green actor and add
when touch is pressed
Do
Change attribute
set game.change color 3 to: self.color.green
______________________________________________________________
Now go in the default actor?
add a new rule
if game.change color = 1
do
change attribute
set self.color.red to 1
set self.color.blue to 0
set self.color.green to 0
_____________________________________________________________
add a new rule
if game.change color 2 = 1
do
change attribute
set self.color.red to 0
set self.color.blue to 1
set self.color.green to 0
____________________________________________________________
add a new rule
if game.change color 3 = 1
do
change attribute
set self.color.red to 0
set self.color.blue to 0
set self.color.green to 1
____________________________________________________________
Now place the actors on screen and test it out!
I been seeing lots of people showing that they were having quite a bit of trouble with color value with one actor to another.
Note: The color will be only changed once but will not mix.
Create 3 global integers
Call them change color, change color 2, and change color 3.
Now create 4 actors?
Leave the default actor as default
Now name the other actors. Color Red, Color Blue, Color Green.
Now go in the color red actor and add
when touch is pressed
Do
Change attribute
set game.change color to: self.color.red
Now go in the color blue actor and add
when touch is pressed
Do
Change attribute
set game.change color 2 to: self.color.blue
then go in color green actor and add
when touch is pressed
Do
Change attribute
set game.change color 3 to: self.color.green
______________________________________________________________
Now go in the default actor?
add a new rule
if game.change color = 1
do
change attribute
set self.color.red to 1
set self.color.blue to 0
set self.color.green to 0
_____________________________________________________________
add a new rule
if game.change color 2 = 1
do
change attribute
set self.color.red to 0
set self.color.blue to 1
set self.color.green to 0
____________________________________________________________
add a new rule
if game.change color 3 = 1
do
change attribute
set self.color.red to 0
set self.color.blue to 0
set self.color.green to 1
____________________________________________________________
Now place the actors on screen and test it out!
Comments