color change

BeanstineBeanstine Member Posts: 101
edited November -1 in Working with GS (Mac)
does any one know how to let the person using the app change the color of something in the app so they can kinda personalize the app??

Comments

  • BreckenBrecken Member Posts: 143
    Hey

    You can have different buttons, so you can say like if you press the green button you want another actor to turn green;)

    Make a bolean game attribute called green. And say when touch is pressed change Game.Green to true.

    Than say in the actor you want to change color on:

    If attribute game.Green = True

    Change attribute : Self.colour. to whatever green is:)

    Hope this helps otherwise pm me :)

    -PL
  • zombieaddictzombieaddict Member Posts: 213
    either set an actor to change its image when its touched or create a global integer attribute named LayoutChanger that turns on rules that change the image of a group of actors.

    so maybe in your options menu you have a button for changing layout. now lets say you have 3 layouts.

    your integer attribute could have 3 states (or whatever). whenever they touch the "change layout" button, have a rule that says

    Rule when touch is pressed

    change attribute game.LayoutChanger +1

    have another Rule that says

    If game.LayoutChanger > 3

    change attribute game.LayoutChanger to 1

    Now whenever you press the button it would keep looping through those 3 numbers. 1, 2, 3, 1, 2, 3, etc

    Now just setup the images you want to display on the screen when the correct integer has been reached. You could either spawn them when they're needed or just have them already loaded and but invisible until needed.

    So lets say you used the invisible route. You would have 3 backgrounds all stacked on top of each other but only one at a time would be visible based on what you selected with your LayoutChanger attribute.

    so the rules for each background would look something like this

    In background 1 there would be;

    Rule when attribute game.LayoutChanger = 1
    change attribute self.alpha = 1
    otherwise when attribute game.LayoutChanger Not equal to 1
    change attribute self.alpha = 0

    In background 2 there would be;

    Rule when attribute game.LayoutChanger = 2
    change attribute self.alpha = 1
    otherwise when attribute game.LayoutChanger Not equal to 2
    change attribute self.alpha = 0

    In background 3 there would be;
    Rule when attribute game.LayoutChanger = 3
    change attribute self.alpha = 1
    otherwise when attribute game.LayoutChanger Not equal to 3
    change attribute self.alpha = 0

    thats just a general idea
  • zombieaddictzombieaddict Member Posts: 213
    premature typing *_*
Sign In or Register to comment.