Headbang Games's Forum Posts

  • You can just check this:

    system -> compare two variables -> missile.count < 3

  • You have an expression family.ObjectTypeName

    I'm not sure if it is exposed to JS, but it probably is.

    So yeah, it is :)

    After picking use:

    weaponInInv[0].objectType.name

  • > 1. There used to be an option for fixed or evergreen exports, it seems like it's only evergreen now, why is that?

    Fixed mode is still supported. It's covered in the Exporting to Windows with the WebView2 wrapper tutorial. I would recommend the latest version though - fears of breakage are usually over-done, as Construct's web exports have been working reliably for years, and even if something breaks, you can always patch your game.

    Thanks for that, I did look at that page, I don't know how I missed that part :)

    > 2. If I use either types of export, I assume there still can be future updates to the exe and dll provided with the export on C3 side, how do I track if and when a new version of that is released?

    Just keep an eye on the changelogs of releases - any such changes will be noted.

    Sure, I figured it would, but in the long run, if I don't follow all updates, it would be easy to miss out on something like this, maybe you can put a version number on the export screen or have a dedicated post/page that we can track.

    On that note, a possible suggestion would be to add a search the release page for keywords, so we can isolate changes made to specific plugins/features, it can also help a lot with bug reports and tracking when things changed and possibly broke.

    > 3. Possibility of controlling the data folder name? -> see this post:

    > construct.net/en/forum/construct-3/how-do-i-8/control-name-data-directory-180023

    I don't see any reason why this needs to be changed.

    Mainly for cosmetic preferences, but it's not a big issue.

    > 4. In theory will it be possible to run C3 editor with it as we used to do with NWjs?

    No, we plan to keep Construct running in the browser. The NW.js editor had a bunch of bugs and limitations due to not being a real browser, and it really has negligible benefit these days anyway, as you can do things like use project folders directly in the browser now (which was one of the main original motivations for having a desktop download).

    I get that NWjs had issues, and I'm not talking about bringing back support for that, but isn't webview2 consider a more native browser than NWjs?

  • 1. There used to be an option for fixed or evergreen exports, it seems like it's only evergreen now, why is that?

    I get that using the latest version is always recommended, but it might also break things and then it's out of my hands.

    2. If I use either types of export, I assume there still can be future updates to the exe and dll provided with the export on C3 side, how do I track if and when a new version of that is released?

    3. Possibility of controlling the data folder name? -> see this post:

    construct.net/en/forum/construct-3/how-do-i-8/control-name-data-directory-180023

    4. In theory will it be possible to run C3 editor with it as we used to do with NWjs?

    As there are still some browser quirks that affects my experience, such as keyboard shortcuts, showing the X icon on the top of the preview window, requiring user confirmation each time I access a project file and a few other stuff.

    Ashley Any insights to share?

    Tagged:

  • Haha, so yeah, it is hard coded in the exe, I can change it with an hex editor but I'm limited to 3 letters :)

    I tried looking for a Chromium command-line arguments that might override that, but no luck...

  • I know it's a little petty of me, but I don't care much for the WWW name of the data directory, is there a way to change that?

    My guess is that it's hard coded in the executable, but still it doesn't hurt to ask :)

  • You are welcome to contact me (email or socials) so we can discuss the details.

    https://headbangames.com/devblog/contact

  • The fastest and easiest way is to use the text box or html object, you can style it and it has a builtin scroll bar.

    The only disadvantage is that you cant draw any sprites on top of that.

    As for storing, pretty much any data object, such as a dictionary, array, json.

    You can also use simple csv/tsv.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you need free movement use the 8 directions or custom movement behaviors.

    If you want it to go the next/previous hotspot, add column and rows variables on the hotspots and on the player's object.

    Add/subtract from that on the player object based on the key press, then pick the hotspot based on those values and move it there.

    If you want it to walk down a certain path you can use path finding, otherwise just move it manually with the X and Y or with the moveto behavior.

  • After picking the 9 or more instances add a sub event

    Repeat -> 6 times

    Pick nth instance -> loopindex

    Set boolean selected -> true

  • Sure, no problem.

    I wasn't aware of the "all sets complete" trigger, it's pretty new.

    Though keep in mind that this will only work if all your sets are fired at the exact same time, most likely from the same event, if there is any delay between them, they might not get batched together, then the all set will trigger multiple times.

  • First of all, if this is not a subevent of a taking damage function/event you should put a "trigger once" on it, otherwise it will run a whole bunch of times.

    To make sure everything is saved you need to move the wait 5 seconds and everything below that to when the "item set" is triggered (though in general 5 second should be more than enough to save everything, which is a bit strange).

    You can loop your saving, meaning once the first is set run the second and when that is set run the third, then do the rest.

    You can put them all in one event with a "wait for previous action to complete" after each set item action.

    But I would recommend to just push all your save data into a dictionary and just save that once with the dictionary.asJson expression.

    You can read the values directly from it too without using globals and you can clear it - same as resetting globals.

  • Yeah, the rest looks pretty much fine.

    There is one extreme condition that might happen, where you manage to kill a baddie before the get complete and restored to the saved value, then it wouldn't count that one. But if you can't kill anyone in the first second or two (depends on the speed of the device reading the local storage) of the gameplay it's not an issue.

  • Any action with the clock icon is not completed instantly.

    You might be switching layouts before the storing is completed.

    You need to wait for the "item set" trigger to happen before allowing switching/restarting layout.

    Also the line baddies=>500 will trigger constantly when it reaches 500, add another valuation if unlockedYce = 0

  • Here's an idea I think may work if you're looking for instant real-time feedback you're going the wrong way...

    1. Add a fence on at least one side of your track (or just an invisible sprite)

    2. Add a unique sprite on the left and a unique sprite on the right side of your car.

    3. Assuming the wall you added will always be on the left if you're going straight - Every tick check if the left side sprite on the car is closer to the wall than the right side sprite.

    I would think the left side of your vehicle should always be closer to the left side of the track if you're going the right direction, right?

    Of course you can add extra layers of checks like if the right side is closer for more than X seconds, or elevation checks if your track overlaps...etc. this might prevent some glitches.

    A little tip.

    My rule of thumb is to use every tick only when it is absolutely crucial for gameplay and mechanics. Especially when it comes to picking instances from a large batch.

    You can check for this once a second or even more and still get a good result for your needs.