Major problem with levels!

This forum is currently in read-only mode.
  • Major problem: I've designed and coded the one level in my game. Now I'm designing the title screen, but when I tell construct to go to the next layout, the layout loads but behaves as if none of the events are working.

    Any help is greatly appreciated!

  • Did you create your events on separate events sheets? Did you include those event sheets in the new layout's event editor?

  • All the events were written into the level's accompanying event sheet.

    I'm going to try moving all the events to a new sheet and referencing them from the level instead of putting them straight into the event editor.

  • Ok, I did that, but the problem is still there.

    Rearranging the layouts seems to cause problems with the event coding. Is this a common problem?

  • Post the .cap up, it's hard to tell what's wrong.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ok, here's the .cap file.

    Thanks to everyone for helping!

    http://gamejolt.com/open-source/games/a ... lease/377/

  • btw, if you delete the top layout, the main level should run correctly

  • Ok, think I solved the problem. Thanks for the help!

  • you use Keyboardandmouse object from previous layout in this one

    add Keyboardandmouse in layout 2, then change title events so they check input from new K&M object.

    but I think this is some kind of bug, checking global on object should make it available in all layouts as I understand.

    Adding new mouse and keyboard object fixes the problem though.

    *

  • The .cap has been removed, so I can't see what you're talking about. But... you shouldn't ever need to have two Keyboard & Mouse objects.

    One is all you need. Just put it in the first layout and mark it "Global."

    If there is some problem with doing that then could someone repost the .cap, and maybe recreate it in a bug report? I don't see anything wrong with that on my end, it's working just fine.

  • http://rapidshare.com/files/247080435/bird2.cap.html

    I Think, but it was saved as tmp for some reasons and maybe I messed with it some, damn autosaves

    anyway try using first mouseandkeyboard object in second layout.

  • <img src="http://www.b3tards.com/u/2951c544e5d930f23b20/emot-siren.gif"> You're doing it wrong. <img src="http://www.b3tards.com/u/2951c544e5d930f23b20/emot-siren.gif">

    That MouseKeyboard object in the first layout is NOT the first mouse and keyboard object. It's a second, separate object. Notice that it's named "MouseKeyboard2"

    Secondly, it's not marked as Global. You need to check the "Global" checkbox in the MouseKeyboard object properties. Then you will be able to access the MouseKeyboard from any event sheet.

    Review:

    • You only need one M&K object.
    • Create the M&K object in your first layout.
    • Check "Global" for the M&K object.
    • ????
    • Profit
  • no no, thats me messing around it.

    I added second M&K, first one is checked as global. look at the title events sheet.

    events there use global M&K object from layout "level" and it does not work.

    its interesting how Delaney solved this problem.

  • [quote:1dolsrrp]

      Create the M&K object in your first layout.

      ...because if you don't then the object will not initialize when your game starts.

    Jump to:
    Active Users
    There are 1 visitors browsing this topic (0 users and 1 guests)