dop2000's Forum Posts

  • You do not have permission to view this post

  • It's hard to tell what your are doing wrong without seeing your project.

    Please share your capx file.

  • Why do you need to protect save files like this?

    As a player I would be pissed if I couldn't load my old saves after replacing some hardware on my PC (say, motherboard or HDD).

  • YoHoho

    Of course you can change it for a bigger grid, just need to modify the values throughout the code - for example for 10x10 grid in event #2 change condition to newX<10, in event #4 change the formula to min(9, x+1) etc.

    Did you watch the video from the first comment? This algorithm is used for dungeon generation.

  • If you have three "Open" functions and all three are called at the same time - that's poor project design, not a C2 issue.

    Construct does many things differently from "real" programming languages, but personally I like how flexible functions in C2/C3 are.

  • unixtime can only return current time. So to convert any date/time in the future you need to use some external function or addon.

    Rex's "date" addon can also convert to unix time.

    EDIT:

    Actually, you don't need to use C3 expression and can calculate the remaining number of seconds directly in JS:

    Set difference to: Browser.ExecJS("(new Date('" & textDate & "').getTime() - new Date().getTime()) / 1000")

  • JS code converts date (textDate) into Unix Epoch Time - number of seconds that have elapsed since January 1, 1970

    "/1000" because that JS function returns milliseconds, and we need seconds.

    unixtime is a C3 expression, it returns current system time in unix format, also in milliseconds.

  • Are you using AJAX to request files? Could you post a screenshot of your code?

  • I think this is by design.

    There are situations where you might need multiple functions with the same name.

    Say, you can have different event groups (KeyboardControls, MouseControls, GamePadControls) and a function named "FireWeapon" in each of them.

    Only one of these groups will be active, so you can call "FireWeapon" function from other parts of your project and don't need to worry about the selected control type.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • See these two files:

    https://www.dropbox.com/s/8zap7yuhwdb0p ... .capx?dl=0

    https://www.dropbox.com/s/r1em8npglbdso ... e.png?dl=0

    (I downloaded them from some old post, which unfortunately I can't find now)

    This example may look different from what you need, but it basically does the same task - connects occupied tiles on the tilemap to each other.

    So if you have two tiles, one at (0,0) and another at (0,1), you need for the first one to select the tile with exit on the bottom, and for the second tile - with entrance on the top. And so on..

    You can do all this with an array instead of the tilemap.

  • Music should continue playing when you change layouts. You probably have an event "Play music" somewhere that is triggered when you go to another layout, that's why it gets restarted.

    You can do this:

    Audio tag "music" is NOT playing -> Audio play Music with tag "music"

    This way even if this event is triggered multiple times, it will not restart the music that is already playing.

  • Here you go:

    https://www.dropbox.com/s/mvkeozz88p943 ... .capx?dl=0

    May not be the most optimized code, but it works.

  • You don't need a button to save or load.

    You can save/load the game automatically whenever you like - before changing layouts, or when layer mission is complete, or when player collected some item etc.

  • There is a link to capx file on the left....