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.
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?
Comments
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.
its free. i was redoing it and wanted to put a undo button incase someone messed up.