briggybros's Forum Posts

  • [...]

    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?

  • 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.

  • kiranchandra so this IDM is confirmed to be the cause?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Taken: J7D4Z-J3KG4-KY2W7

  • So is each tile a sprite instead of using a tilemap?

  • What browser are you using?

  • you can still add images, just place them between the [ img ] [ /img ] BB tags. (without spaces)

    I can make it work like this:

  • Touch.Gamma gives the tilt of the device, mess around with that. If you want to make it smoother look into interpolation.