Layout Duplication

0 favourites
  • Maybe I'm missing some simple, so I thought I would ask here. Just as an example to test, if one takes say the Pacman example. Now, I duplicated the layer and told it to use the event sheet from the previous layer. However, when running a test on layer 2, the ghosts just slide off the screen. Run layer 1 and everything is fine. Appreciate the feedback.

  • Can you post an example .capx? If I do that here, everything works fine..

  • Sure can, you can use the below example which is what I did.

    http://www.scirra.com/tutorials/308/cloning-the-classics-pacman/page-1

  • I just tried with that capx and it worked perfectly.

    My exact order of events: right-click Main Layout in the projects pane, click duplicate. Change Layout 1's event sheet to Main Events. Delete Main Layout. Run game.

    Everything is fine, although it should be noted that Pac-Man seems to be a little sick; his angle doesn't seem to update properly when changing direction. But that happens right off the bat without changing layouts.

  • The idea wasn't to delete the main layout, but to create additional layouts using the same event sheet. I should have included that statement in my first post.

  • I did that just to test. It works whether or not I delete the initial layout.

  • What version of C2 are you using GeometriX?

  • The latest beta, r112.

  • Well, I'm at a total loss then. I did the exact same thing, made sure I saved the changes, ran the second layout and ghosts moved through the walls and off the screen. I too am running r112, under W Vista Ultimate and Firefox 17.0.1

  • That is weird, I'd suggest posting a bug report then. For the record, I'm using Windows 7 Ultimate 64-bit and running Chrome 23.0.1271.97. Maybe try the same capx on another PC and/or browser, just to reduce the variables?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tried with the same Chrome you have and received the same results. I don't have another Windows based PC to try this on. I'll wait and see if anyone else experiences the same issues with the example.

  • You should post the very capx you do, it's likely there is a slight mistake in it that makes it so that the game is not behaving as expected.

  • Duplicating the layout doesn't duplicate arrays because they are normally global objects. In that capx the AvailableDirections array is not global but if you change it to global it will work.

  • Kyatric : I did post a link to the example I was using which was a tutorial with a capx I was using.

    ramones : Thank you. That indeed corrected the problem. I greatly appreciate you taking the time to find the solution. Many thanks!

  • Ah, I learnt something new too. Doesn't explain why I had a different result, though, but I guess broken is broken - the fix is the same :P

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