Name selection don't work, why not?

MichaelK1985MichaelK1985 Member Posts: 36
edited February 2012 in Working with GS (Mac)
I'm trying to get this work for the past four hours and I don't get it!

http://i43.tinypic.com/116s4lu.jpg

What's wrong with this?
I want a check in what team your in. And a value that says what name he displays. When you touch it has to change in a different name.
Any idea what I do wrong?
Thanks

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Hi @MichaelK1985

    Try this, see if it gets the results you're after:

    3Namen

    Rule:
    When game.Team... = 3

    Rule ---(within top one)
    When game.1NaamBeurt = 1
    Change attribute game.1NaamBeurt to game.1NaamBeurt ---
    Otherwise
    When game.1NaamBeurt = 2
    Change attribute game.1NaamBeurt to game.1NaamBeurt ---
    Otherwise
    When game.1NaamBeurt = 3
    Change attribute game.1NaamBeurt to 1

    hope that helps! :-)

    ----------------------------------------------
    http://davidgriffinapps.co.uk/

    iPad: End of the Earth game coming soon to the iTunes App Store....

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

  • MichaelK1985MichaelK1985 Member Posts: 36
    edited February 2012
    Nothing happens :-(
    I want this on a touch = pressed event. But nothing happens when I enter the info like you prefer!

    ***Update***
    After a couple edits, it works fine now :-) Thanks for your input :)
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Hi again, just to check: in your Change Attribute behaviours, I'm guessing you're using

    Change attribute game.1NaamBeurt to game.1NaamBeurt + 1? (As I couldn't see the complete attribute in your screenshot, I put "to game.1NaamBeurt ---" so assuming you'd put what was already there previously). So, if this change attribute info is Change attribute game.1NaamBeurt to game.1NaamBeurt + 1

    then by putting in your touch pressed event, it should work as you want:

    Rule: When touch is pressed

    Rule --(within above rule)-- When game.Team... = 3

    Rule --(within second Rule)-- When game.1NaamBeurt = 1

    Change attribute game.1NaamBeurt to game.1NaamBeurt + 1

    Otherwise

    When game.1NaamBeurt = 2
    Change attribute game.1NaamBeurt to game.1NaamBeurt + 1

    Otherwise

    When game.1NaamBeurt = 3
    Change attribute game.1NaamBeurt to 1

    That should work for you! :-)

    P.S Make sure you nest in the correct Otherwise sections!


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

Sign In or Register to comment.