faulknermano's Recent Forum Activity

  • I've written a short article on an alternative way to z-sort in the context of an isometric viewpoint. I don't know if such a solution has been presented before, so pardon me if this is old news. Most of the sorting solutions I have seen is based around the Y-position of Sprites, and I had a specific problem that led to this method.

    The purpose of the alternative is to enable sorting on Sprites which have an 'irregular' shape, which means the image goes beyond the usual square/diamond tile area.

    This is just a starting concept with simple examples to illustrate the idea, so don't know how much modification it will have down the line.

  • I think Families can only hold one type of object, so sorting via the System plugin is limited to that. Are you saying that, for example, a Tilemap object can be on top of a Sprite?

    If so, the only thing I can think of is to use Rex's ZSorter, which enables you to sort for the whole layer. However, I myself haven't tried this with multiple object types but I think it might work. You also must use the Sort by Function feature, as you are using instance variables as a basis for sorting. However, in my experience, ZSorter is slower than C2's sorter.

    You may want to compromise mixing object types and keep it simply to Sprites when it comes to sorting. Let Tilemaps sit on the bottom or at the top, and not in between.

    On the other hand, if you had a simple situation where you had a TilemapSortFamily and a SpriteSortFamily, then perhaps you can do a System sort on the SpriteSortFamily first, and then loop through the TilemapSortFamily which checks each SpriteSortFamily's z-index. Then if it finds the proper z-index to insert itself you can 'Move to object > SpriteSortFamily > In front/behind'.

  • C2's AJAX plugin will allow you inject an external text file as a string. Pass this string to the csv2array/csv2dictionary plugin.

  • I think it's because you're not sorting the other two purple Sprites along with the blue Sprite.

    If you put Sprite and Sprite2 into a family, and then apply the ZIndex based on your variable, and then sort the family, you should get the expected result.

  • Try using the Windows key + Arrow keys. They are Windows shortcuts to move the active window around.

    Alt+Space will also give you the window's positioning menu as well.

  • Use some recovery software like Recuva.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have had the same problem before in some projects. The solution I've came up with is a workaround:

    • I'm using pathfinding to move.
    • I detect being 'stuck' if my Player is overlapping a collision object (CollisionFamily)
    • I disable the Solid behaviour of CollisionFamily.
    • I regenerate my pathfinding map.

    Because you didn't provide a capx to demonstrate your setup, I'm not how much of this is of help, but I just recall how I had an issue with getting stuck in colliders, too.

    best,

    lernie.

  • Possible addendum re changing the icon of the window frame (when exporting windowed mode), unless already covered somewhere that I might have missed:

    In short: modify the "icon-128.png" found in the current project's /icon folder as it is used for the window icon.

  • thehen

    Thanks for the info! Works like a charm for the .exe. I just couldn't change the titlebar icon...

    Anyway, thanks for your help!

    Just for reference, I found a way to change the NWJS window icon. Searching for the package.json in the C2 installation directory (which I assumed was the template which configs in NWJS are compiled from), eg C:\Program Files\Construct 2\exporters\html5\nwjs, opening up package.json revealed a property -> "icon": "icon-128.png". This "icon-128.png" is a reference to the current C2 project's /Icons folder. Editing this icon will change the window icon during export.

    Alternately, you might be able to change the package.json template, but I think editing the C2 icon is better.

  • In my opinion, your current 'workaround' is pretty good as it is. If the solution is consistently working, and does not show itself to be prone to bugs, then why not consider that as a feasible solution?

  • Autohotkey, it's a scripting tool to automate stuff.

    By highlighting, I think you're referring to the event sheet? If so, yes, it is a visual indicator, but I'm trying to get the current line number programmatically/externally.

    However, I just realised that I can only spy the first column's text (using Autohotkey) from the bottom ribbon status bar (ie the text 'Ready'). So even my status bar suggestion might actually not work because I can't access all of the info in the status bar.

    What I'm ultimately hoping for is to be able to query/spy important layout state information from the interface controls so that I can contextualise my macros. But due to their opaqueness, I get stumped now and then.

    Thanks for replying.

    best,

    lernie.

  • Ashley: To help with C2 productivity and workflow, I make some use of AHK to enable shortcuts and such. To do this, I sometimes use info that's exposed from the windows. I'm trying to formulate a quicker way to navigate around an event sheet, and it would be extremely useful to be able to know which event sheet line number the selection is currently at. I'm supposing that such an gui-related addition will be relatively trivial, and that you would consider this if another C2 build is in the works.

    Of course, if there's actually another way to programmatically determine the line current line number, I'm all ears. Thanks!

faulknermano's avatar

faulknermano

Member since 26 Jul, 2014

Twitter
faulknermano has 1 followers

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies