Logic Question - Walking Man

hzappshzapps Member, PRO Posts: 173

Aloha All,

I am stuck with a Logic Problem... If i want to touch one box to make one leg move and then touch a different box to make the other leg move but make him crash if you touch the same box twice in a row....... What could I use as the Logic for this?

Basically two taps on one box would make the guy fall over...so they need to be tapped like left right left right left right etc. without tapping left left or right right.

Sounds silly but I'm Stuck

Hang Loose
Mike

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2014

    .

    Hi @theazlowes try something like this: make two new integer attributes, let's call them Lcount and Rcount.

    Add to your left button:

            Rule When touch is pressed
            Rule: --nested in above rule- When attribute Lcount = 0
            Change Attribute Rcount to 0
            Change Attribute Lcount to 1
            --your left leg animation stuff
            Otherwise
            When Lcount = 1
        Change Attribute Rcount to 0
            Change Attribute Lcount to 2
    
        Rule: When attribute Lcount = 2
        Change Attribute Lcount to 0
        ---your fall over animation stuff
    
    Add in your Right button:
    
        Rule When touch is pressed
        Rule: --nested in above rule- When attribute Rcount = 0
        Change Attribute Rcount to 1
        Change Attribute Lcount to 0
        --your right leg animation stuff
        Otherwise
        When attribute Rcount =1
    Change Attribute Lcount to 0
        Change Attribute Rcount to 2
    
        Rule: When attribute Rcount = 2
        Change Attribute Rcount to 0
        ---your fall over animation stuff
    

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • hzappshzapps Member, PRO Posts: 173

    Thank You. You Rock. I was thinking along those lines but no where near that clear.

Sign In or Register to comment.