Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I was figuring out how to make undo a card in solitaire game, R0J0hound was genius to made .capx http://www.scirra.com/forum/solitaire-game-with-construct-2_topic60938_post374424.html#374424 , i was thinking to use webstorage to get each card values after of dropping a card and press a button to undo the dropped card, the problem is i couldn't find any help, i tried to experiment but it breaks the game.
Do you have better ideas?
Develop games in your browser. Powerful, performant & highly capable.
With an undo you would want to save the state (position, variable values, etc...) that the card was before it was moved. The only issue that may come up in my example is with the positioning of stacks of cards, but there may be others.
You could create a different array each time a player does a move ... That's my 25 cents ...
Well, i'm quite confused because i'm not good to implement memento pattern, i've added Array object, then i made actions to set Card values on list 11.
The problem is this game is using local variables, i don't think i could copy these events to undo.
Do you think are you able to slove this .capx?
Isnt possible to make memento implementation for this game?
Sometimes i bump this thread because i feel helpless, i apologize