Move Rule no longer working

MagianMagian Member Posts: 3
  • Loaded the Basic Shoot 'Em Up template
  • Created a new scene
  • Created a SpaceShip actor
  • Drug the actor into the scene
  • Added a Move rule to the Prototype

When we first ran the game this rule worked correctly and the spaceship moved to the right when the right arrow key was pressed.

I then renamed the rule to "Movement" and clicked "Off" to disable the rule and see if it worked as expected. It did.

However, after I clicked "On" and played the scene once more, the rule would no longer worked. I even tried recreating the rule but it still does not work. Any idea what I might have done?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited June 2014

    Some things to check:

    1. Are you using Creator on a Mac or PC?
    2. Did you accidentally unlock the actor in the scene and create an instance with its own rules? A quick way to resolve this is to delete the actor and then re-add it to the scene. This is the most likely cause of the problem, by the way.
    3. Try adding the actor to a new, blank scene. Does the Move rule work as intended?
    4. Add various Log Debugging Statements to that actor. For example, at the top of the list of rules, add "1" and then further on down, add "2", etc. so that you can open the Debugger from the View menu and watch to see which values appear.

    Report back your findings and we'll go from there...

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • MagianMagian Member Posts: 3
    1. I am using a PC
    2. I deleted the actor in the scene. However, before this deletion occurred, I had made changes to the actor in the scene and select to "Revert to Prototype" to have the changes pushed back to the prototype. After adding the prototype to the scene the problem persisted.
    3. No.
    4. There is only a single rule applied to the actor. I have not worked with the Log Debugging Statements before, but I see it listed in the Behaviors. I assume that I just add it as a new rule above the existing rule?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Log Debugging Statements can be added anywhere... within rules, before rules, after rules... they just log information to the Debugger window but otherwise don't affect your code.

    You might want to either post a screenshot of the rule in question or post a link to download your file (.zip it first). That way we can assist you further.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • MagianMagian Member Posts: 3

    Let me know if this doesn't help and I will upload the project.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    That looks correct. You're welcome to post the project and I can take a look. It may be something simple like an extra space in the key field or it may be something that isn't that obvious.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • MagianMagian Member Posts: 3

    We finally solved the problem and, while I am a bit ashamed to say what it is, I still think it is somewhat odd.

    The problem was that the Play screen did not have focus. :blush:

    That being said, the reason that I never suspected this is because when I first open GameSalad and run the game for the first time, the Play screen has the focus and works correctly. On all subsequent runs, I must first click the screen with the mouse before anything works.

    Anyway, at least the problem is solved. Thank you for trying to help.

  • dexterdethdexterdeth Member Posts: 1

    I was having the same problem. It is kind of weird that the screen is loses the focus after making changes. I am glad I found this thread.

Sign In or Register to comment.