GameSalad

Help Color

bradJ2407bradJ2407 Posts: 2Member

I am having a lil trouble with with this word game and changing color attribute. Lets say I have 20 words on board. I want to be able to click a word and it highlights it blue but once I click another word it becomes a solid green and the word that was just newly selected becomes highlighted blue and so forth till the letters make a word. I have an attribute for selected is true but the word just stays hilighted blue on each word clicked. I know its probably something fairly simple that I need to add probalbly. Just need a little help in the right direction

Comments

  • SocksSocks London, UK.Posts: 12,821Member

    Make yourself an attribute for the letter actor, let's call it "WTF!"

    Rule:
    When touch is pressed and When WTF! = 0
    --Change colour to blue
    --Rule:
    --When button is up
    --Change WTF! to 1

    Rule:
    When button is down and When WTF! is 1
    --Change colour to green

  • bradJ2407bradJ2407 Posts: 2Member

    @Socks Hey thank you that worked but it seems that if I click anywhere on the screen after it changes the previous color even if I don't click on a letter.

  • SocksSocks London, UK.Posts: 12,821Member
    edited January 15

    @bradJ2407 said:
    @Socks Hey thank you that worked but it seems that if I click anywhere on the screen after it changes the previous color even if I don't click on a letter.

    Make yourself an attribute for the letter actor, let's call it "WTF!"
    Make yourself a game attribute (a boolean will do), let's call this one 'OMG!'

    Rule:
    When mouse is inside
    --Change OMG! to 1
    Otherwise
    --Change OMG! to 0

    Rule:
    When touch is pressed -and- When WTF! = 0
    --Change colour to blue
    --Rule:
    --When button is up
    ----Change WTF! to 1

    Rule:
    When button is down -and- When WTF! is 1 -and- when OMG! is true
    --Change colour to green

Sign In or Register to comment.