MikaelS's Recent Forum Activity

  • In that case I just have to enable the buttons. Thanks!

  • First, thanks for a great product!

    I was planning to use a number of button/dialog pairs to work kind of like a tab view, with each button first closing any open dialogs and then opening its own dialog (tab). However, the non-modal dialogs block access to the buttons, thereby preventing this to work. Is this by design or is it a bug? I would have expected only modal dialogs to block everything outside the dialog.

  • I'd like to control the led light of a mobile phone from Construct 3, in order to take pictures using the User Media plugin in darkness. Is it possible? I can find no expressions for this and I have searched both the User Media plugin and other plugins without success.

    Tagged:

  • Yes, I didn't understand that. Strange.

    However, I have now implemented your other solution using movement and scaling with events. This works as expected. The only problem now is that I have been mixing sprites and tilemaps on different elevations to create my map. Basically, I have used tilemaps for floors and sprites for walls, creatures and objects. With Construct 3's z elevation this wasn't a problem, but since tilemaps can't be scaled I don't think they can't be put on different elevations using events, at least not easily. Also, z-sorting tilemaps and sprites together seems to be difficult to achieve using events.

    Painting the tilemaps onto DrawingCanvases would solve the scaling issue, but not the z sorting issue. Z-sorting would be solved if DrawingCanvases could be put into the same family as sprites, and the family then being z sorted, but mixed families aren't allowed, as far as i know. I will have to think about this some more. Perhaps I will have to convert everyting to sprites instead.

    Anyway, thanks a lot for your help!

  • Thanks for the new example. I might use that method instead.

    However, I would really like to understand why I can't get DrawingCanvas to work. I have attached a new example with only six sprites and two groups, one with z elevation and one without. There is no scrolling at the moment. How much the DrawingCanvas should be translated to the right side is controlled by the global variable Movement. Apart from that, I use exactly the same events as in your first example.

    For both groups, a Movement value of zero works as expected.

    For neither group, a Movement value other than zero works. There is no translation, and I don't understand why.

    https://1drv.ms/u/s!AmzKqSRFlvJqa9elDEImSJco0ho

  • I have been doing some more experimenting. If the same events are triggered from a keypress, I get exactly the same result as before, but by adding a small wait, it works as expected:

    Wait 0 is not enough.

    According to the manual, pasting an object happens at the end of the tick, which I assume is why the wait solves the problem. However, I don't understand why dop2000's example is working and mine isn't.

  • dop2000, I tried to modify your example to use it in my project, but I can't get it to work. The sprites with no z elevation don't move at all, and those with a higher z elevation move in the wrong direction and the wrong distance too. I center the canvas on the screen, draw the objects and then move the canvas 400 pixels to the right. Could you take a look and see what I am doing wrong:

    https://1drv.ms/u/s!AmzKqSRFlvJqatvdb2fUk57-FzY?e=huqyw4

    Thanks!

  • I think I will try something similar to your DrawingCanvas example. That seems to be exactly what I need. Thanks!

  • I am trying to use z elevation on a layout that is divided in two parts, one status window on the left side and a top-down view of the game to the right. The status window is on one layer with 0% parallax and the top down view is on another layer with 100% parallax. Both have an approximately equal width.

    Now I would like to use z elevation on the top down view to make it more interesting when scrolling. This works partially, but since the center of the top down view is not at the center of the layout, the objects aren't moving as expected when the top down view is scrolled. Instead of moving relative to the center of the top down view, they are moving relative to the center of the layout.

    Is it possible to set the position of the focus of the z elevation camera to a point other than the layout center?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Of course! I have now changed the wait statement and the progress bar updates as it should. Thanks!

  • It turns out that I was mistaken. My code doesn't work fine with large arrays. These are my events (CurrentColumn is a local static number defined above):

    With the wait statement in event 32 enabled, Construct just goes through the Array very fast, but the entire loop ends before everything is actually loaded. It doesn't seem to wait the 0,5 seconds per CurrentColumn. With the wait statement disabled, the Array eventually loads as intended and the browser prints log messages during the loop, but Chrome says that the page is not responding and the progress bar is not updated during the loop.

    I am using this to load a very large csv file, exported from Tiled and containing 400 times 400 tiles, so the calculation of each row takes quite some time, up to 1.5 seconds. I have tried with different wait times, up to two seconds, but without success. I guess that I am doing some obvious mistake here, but can't figure out what it is.

  • Thanks for the answer and the example! I have changed my code accordingly and now it works fine.

MikaelS's avatar

MikaelS

Early Adopter

Member since 21 Feb, 2017

None one is following MikaelS yet!

Trophy Case

  • 7-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies