Game Development Reference
In-Depth Information
Simply adding three Change Attribute behaviors to the rule and changing the colors
to
1
when being touched, and
0
when not, will highlight the button on touch. It's
not required, but hey, it looks a lot better! Let's go back into our Kevin actor, copy
and paste the
Keyboard Controls
group, and rename it to
Touch Controls
. Now
we have to change each rule from
Actor receives event
|
key
, to
Attribute
|
game.
LeftButton
|
is true
(or whatever button is being pressed). Test it out to see if
everything works. If it does, awesome! If not, go back and make sure everything was
typed in correctly.
Don't forget, when it comes to changing attributes, you can't
simply type in
game.LeftButton
, you have to click on the
…
button beside the
Attribute
, and then click on
Game
, then click
LeftButton
.