User Tag List

Page 3 of 3 FirstFirst 1 2 3
Results 21 to 30 of 30

Thread: Creating an Undo Command for Sokoban

  1. #21
    Clicker Fusion 2.5HTML5 Export Module

    Join Date
    May 2017
    Location
    Sabattus, ME
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    TO... Simflare, UlitmateWarrior, Caesar
    I am making a game for my disabled wide called Sokoban... ever heard of it?

    See it here:
    https://community.clickteam.com/threads/101700-My-1st-Game-Sokoban-Need-Help

    So, I got a hold of the undo example that was in this thread.
    I got it implemented fairly easily.

    When my bulldozer moves, I have it pointing in the direction it's going using the "Walking" animation (just 1 frame)

    The UNDO works awesome... however, in my game when I undo the bulldozer stays in the last "walking" position I was at.
    And I know that the Undo array isn't saving the walking direction.

    Q: How can I save the walking direction in the array??

    I would appreciate any input you all may have.

  2. #22
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    574
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Save it in a spare column. For instance the undo example uses 0,1,2 on the X of the array. So you could use 3 to store the direction.

  3. #23
    Clicker Fusion 2.5HTML5 Export Module

    Join Date
    May 2017
    Location
    Sabattus, ME
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by danworth View Post
    Save it in a spare column. For instance the undo example uses 0,1,2 on the X of the array. So you could use 3 to store the direction.
    Okay... I will give it a shot

  4. #24
    Clicker Fusion 2.5HTML5 Export Module

    Join Date
    May 2017
    Location
    Sabattus, ME
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    2 Questions...

    1) Since the array is numerical... what value do I use for direction?

    2) I would like to limit the undo's to just 1 but keep the code in tack.
    I am thinking of using a global value that I set for the number of limited undo's.
    What would be the best way to do this?

  5. #25
    Clicker Fusion 2.5HTML5 Export Module

    Join Date
    May 2017
    Location
    Sabattus, ME
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is my attempt

    If UndoLimit <=1 then stop the loop.... doesn't work

    sokoban14.jpg

  6. #26
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    574
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    The inbuilt directions are 0-31. So you can store just the current direction.

  7. #27
    Clicker Fusion 2.5HTML5 Export Module

    Join Date
    May 2017
    Location
    Sabattus, ME
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay... I am almost there.
    However, I can't seem to get the RecoverObj even entered.
    I don't seem to have the option to get the value from the array.

    When I select the Direction on the "move-able" object, all I get is the window where you manually select which direction (the one that looks like a clock)
    I have no option to add further code.

    I am sure I am missing something.


    sokoban15.jpg

  8. #28
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    574
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    You can press 1+1 to use an expression.

  9. #29
    Clicker Fusion 2.5HTML5 Export Module

    Join Date
    May 2017
    Location
    Sabattus, ME
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by danworth View Post
    You can press 1+1 to use an expression.
    Check this out...
    It doesn't work though.

    Should I be specifiying whether it's Stopping Dir or Walking Dir.
    I have my bulldozer face the direction on both Stopping and walking


    sokoban16.jpg

  10. #30
    Clicker Fusion 2.5HTML5 Export Module

    Join Date
    May 2017
    Location
    Sabattus, ME
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pixelink View Post
    Check this out...
    It doesn't work though.

    Should I be specifiying whether it's Stopping Dir or Walking Dir.
    I have my bulldozer face the direction on both Stopping and walking


    sokoban16.jpg
    Can anyone shed light on why the undo function of these events is not setting the direction of the player?

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. Sokoban (Flash Game)
    By warlords in forum Released Games & Apps in Flash
    Replies: 0
    Last Post: 14th January 2014, 09:32 AM
  2. Undo bug
    By Skyhunter in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 3rd October 2012, 04:30 PM
  3. Undo Bug: resizing objects doesn`t undo
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 3rd March 2007, 09:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •