undo button

BeanstineBeanstine Member Posts: 101
edited November -1 in Working with GS (Mac)
Does anyone have an idea or know how to make an undo button on your app to undo the last thing that happened or pressed?

Comments

  • latygo60latygo60 Member Posts: 27
    I think it can be done.

    Try this:

    Make an integer attribute called 'last thing'

    for every action you can make, assign a number.

    Then, when something is made, change the last thing attribute to the assigned number to that action.

    And in the Undo button, you have to have a rule for every action that you can undo.

    When attribute 'last thing' = 1 ...
    When attribute 'last thing' = 2 ... and so on.

    In every rule you have to change to the start or last position the actor, that you'll have to track it's position with another couple of attributes for X and Y coordinates.

    I can't be more specific because I don't know what's the game about.

    I don't know if this works.

    Hope it helps.
  • BlackbirdStudiosBlackbirdStudios Member Posts: 493
    What latygo said would probably be the best way of doing it. But he's right, it all depends on the type of app. This could work wonderfully for some apps and fail horribly for others. What type of app/game is it?
  • BeanstineBeanstine Member Posts: 101
    here is a link: http://itunes.apple.com/us/app/score-keeper-baseball/id446027222?mt=8

    its free. i was redoing it and wanted to put a undo button incase someone messed up.
Sign In or Register to comment.