dop2000's Forum Posts

  • It's possible to set an image as a splash screen for an Android or iOS export. But there is no such option for desktop exports.

    Is there any way to show a static image or logo (without the progress bar) while the game is loading?

    Note, that I'm not talking about the Loader layout, I mean the initial screen which is shown immediately when the game starts, before the Loader layout.

  • This is great, thank you so much!

  • This is not possible with events. The shortest code you can make is two actions:

    Set Player1Percentage to (character.Player=1 ? newValue : Player1Percentage)
    Set Player2Percentage to (character.Player=2 ? newValue : Player2Percentage)
    

    It's possible to refer variables by name in scripting.

    Or instead of global variables you can use a dictionary. Then you will be able to get/set dictionary keys by name like "Player"&character.Player&"Percentage"

  • Since you didn't post your code, I can only suggest studying the official turret examples in Construct 3.

  • Search for "trajectory" or "arc" on this forum, this is a very popular question and has been discussed many times.

  • Thanks, this is really helpful!

    There is one problem though - you can change the location of Documents folder in Windows. I don't think many people do this, but still.. In that case the folder may not be in the home directory at all.

    I'm surprised there is no default environment variable in Windows like %DOCUMENTS%.

    It is possible to get the folder location from windows registry, but I'm not sure how to do this in Construct. Run File "reg.exe query key_name >> file.txt", and then read that file?

  • Try installing any of these versions of the plugin:

    dropbox.com/s/ik417fflksmwkuh/easystartilemap_1_05_module.c3addon

    dropbox.com/s/3ptvb7en4gra8b4/easystarjs_module_myfixes.c3addon

    If still doesn't work, press F12 when you get that error and check for messages in the console log.

  • Most modern games create save files in the default Documents folder, for example \Documents\StudioName\GameName\save01.dat

    How do I find the path to this folder with NWJS?

    NWJS.UserFolder returns the path to my user folder, which is "C:\Users\dop2000\"

    The documents folder is there, but depending on Windows version it may be named "Documents" or "My Documents" or may be even be in some other language. So how do I locate it?

    And what is the best location for game saves on Mac?

    Tagged:

  • I want to understand, why a subevent doesn't work with "while" loop?

    Your event #1 on the second screenshot runs on every tick. There is only one condition (variable<10) which is always true. As a result this loop becomes infinite and the game freezes or crashes.

    In the first screenshot there are two conditions in the event. The first condition is true, but "every 0.5s" condition is false most of the time, that's why the loop doesn't freeze and the code works.

    But I would say both examples are wrong.

  • If you want to add 1 to the variable every 0.5s until it reaches 10, you don't need "While" condition at all. Change your code like this:

    Every 0.5s
    Variable<10 : Variable add 1
    

    While is used for loops which run in one tick. For example "While Car not overlapping Wall, move Car 1px"

  • What "Kalman Filter demo"?

  • You need to set collision polygons in the sprites correctly. Then you can check if a tile is overlapping the sprite.

    Check out this demo, it's very similar, except it uses another tilemap to check for collisions:

    howtoconstructdemos.com/auto-fill-collision-map-for-top-down-games

  • It does, you need to set up a web app in the developer console.

    You'll likely have to upload the game to the actual webserver to test, it won't work in preview because of CORS restrictions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the group gets activated after 3 seconds. But "On start of layout" event in this group is not triggered, because at this time the layout is already running.

    I suggest you use Timer behavior instead of "Time>3 second + Trigger once" conditions.