briggybros's Recent Forum Activity

  • Problem Description

    ____ A concise description of your problem here ____

    When running my project in debug mode with NWjs, if an alert is closed via the red cross it comes up with this error:

    TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.

    at TypeError (native)

    at instanceDestroyed (http://localhost:50000/debugger.js:434:11)

    at onMessage (http://localhost:50000/debugger.js:233:6)

    This does not occur when using the normal play mode.

    I cannot recreate this error in a new project, so have attached just the first layout of my current project.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/70605402/error.capx

    Description of Capx

    Simply the first layout of my project with all elements not influencing the problem removed.

    Steps to Reproduce Bug

    • Open project
    • Run from layout 'Loader' in debug mode
    • When the browser alert pops up, close it via the cross
    • If it does not error then restart with the restart button on the debug section of window. (Repeat previous step)

    Observed Result

    NWjs throws an error

    Expected Result

    No error <.<

    Affected Browsers

    • NWjs

    Operating System and Service Pack

    Win 7 Ultimate - SP1

    Construct 2 Version ID

    207 64 bit

  • Would be nice just to have it as part of the text object, but this will do

  • From what I can see, there is no way to set the vertical and horizontal alignment of text from an event sheet. Can this be a thing?

  • [...]

    Edit:

    In another way if you want a parent to have any number of children then you give the children a parent uid in the child instead.

    But say the parent was destroyed, wouldn't you have to loop all objects that could be children to check that the destroyed object was their parent.

    I can see that it's possible with the tool-set provided, but I still think it could really help workflow. Coming from working with OOPLs I feel like this would aid the developer.

  • You could have the uid of the object inside said variable maybe?

    But then if I wanted multiple objects? I would need multiple variables or use a cdl of the uids in a string variable; which would then need to be iterated over every time I wanted to use a child object. I know it works that way, it's just not as tidy than I feel it could be.

  • I don't think this is currently possible, if it is I'd love to know how, but if not I'd like to suggest it.

    Currently I can only assign text, a boolean or an integer to an object. Could it be an option that we can assign other objects to an object in a similar way?

    I think it would be easier to say have an array attached to a sprite which could hold inventory data or something like that, than to have a global array. Sure the global array method works if you've only got one player, but using such a method in conjunction with say the multiplayer object can start to make the array a bit more confusing, especially for beginners. If the array could be set as a child of the sprite and each sprite had their own array, referenced like a behaviour can be would make construct easier to work with in my opinion.

    Another use could be to have a sprite as a child of another sprite which could function like a container, where if the parent is destroyed all children are subsequently destroyed, but if a child is destroyed its parents and sisters are not destroyed. Again, I think this extra aspect could make construct a lot more intuitive than it currently is.

    ~ Briggs

  • Hello, I want to make a GUI from a mixture of elements, mostly 9patch's. I want to have functions which assemble the GUI from its parts. I have done this, however, when removing the GUI I currently have to loop through all instances of the components and remove them. This method would break if I were to have two panels open simultaneously and only wish to close one; this is not currently a problem and I don't foresee it occurring in my current game, however it is still a flaw of the method. I am now trying to simply remove all of the objects without the loop. The containing method would work if it were possible to have conditional containers for instances instead of the containers currently available. I could, in an OOPL create an array of classes for sub components within the main panel class, however, that's not the case for C2; unless you can somehow define an object as a child of another.

    What is the best solution for the problem? Will I just have to stick with the loop?

  • bump

  • I am trying to find a location for the save files of my game. I am trying to use NW.js to export. The manual recommends using NWjs.UserFolder for permissions reasons. I would like to be able to get to the documents folder from there and create a folder inside for my game's files.

    Firstly as I understand, with different versions of Windows, the documents folder changes name, "./documents", "./My Documents" etc. How can I combat this? The only system information I can find is from the browser object and it returns Win32 for any windows OS, so it doesn't really help.

    For Mac and Linux I simply don't know what the file system appears, so I need pointers on those two.

    Finally: I run Windows 7 on a machine with two hard drives. All of my documents, pictures, music etc. is on drive E, whereas all my programs and that sort of data are on drive C with the os. Even knowing the name of my documents folder does not help. Using NWjs.UserFolder I can manipulate the directory "C:\Users\Briggybros" However, my documents folder is located at "E:\Users\Briggybros\documents". It is registered with Windows that this is my documents folder and I can access it as normal. However, using [NWjs.UserFolder & "\documents"] gives an empty directory as it is not there without the use of Windows' referencing. Can this be tackled at all?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry, I only considered it for one player. If you take the event which is "for each box" and make it a sub event of a new "for each player" loop then that should work.

briggybros's avatar

briggybros

Member since 7 Mar, 2011

None one is following briggybros yet!

Connect with briggybros

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies