R0J0hound's Forum Posts

  • You forgot the capx of the problem.

  • Say the uids of all the objects in the groups are 0,1,2,3,4,5.

    Then right before event 8 the "selected object list" or sol is all the instances in both:

    group1= 0.1,2,3,4,5

    group2= 0,1,2,3,4,5

    Then in event 8 the condition "group1:pick by uid 1" modifies the sol to:

    group1= 1

    group2= 0,1,2,3,4,5

    and the action "group1: set opacity to 50" takes the picked group1 or instance 1 and makes it's opacity 50.

    Next consider event 9.

    Right before it runs the sol is:

    group1= 0.1,2,3,4,5

    group2= 0,1,2,3,4,5

    Then in event 9 the condition "group2:pick by uid 1" modifies the sol to:

    group1= 0,1,2,3,4,5

    group2= 1

    but then the action "group1: set opacity to 50" is the same as in event 8. It takes the picked group1 or all the instances (0 to 5) and makes their opacity 50.

  • Supposedly there's a way to build without it. It's called normal and with it it's called sdk. However that seems to be too much trouble. There was also a way to have a trigger when the devtools were opened so it could then be closed immediately, unfortunately this was depreciated in newer nw.js versions.

    The best we can do is disable the shortcut keys to open the devtools. Use the browser object to run this js at the start of the layout.

    "document.onkeydown=function(e){var evtobj = window.event? event : e;if (evtobj.keyCode==123 || (evtobj.metaKey && evtobj.altKey && evtobj.keyCode==73))return false;};"

    I got it from this link, and it's supposed to work on windows, linux and mac.

    http://stackoverflow.com/questions/3365 ... on-nwjs-13

  • In events 5 and 9 you are picking from group2 but the action that sets opacity is for group1. I'm guessing you meant to have the action apply to group2 not group1.

  • You can probably find the blog post by ashley about the audio formats supported by C2 and why. It's mainly due to the need to be able to convert the audio to multiple formats so the audio is playable everywhere. Mp3 has licencing stuff associated with it's file format when reading/writing it so that's why it might not be suggested. Different browsers support playback of different formats as listed here:

    https://developer.mozilla.org/en-US/doc ... ia_formats

    In actuality all I think you're looking for is the ability to play a sound from an url with the audio plugin. So a feature request perhaps?

  • Yeah, as long as the layer has "force own texture" enabled.

  • Physical accuracy isn't really important in this case since you're going for a look, and a bunch of springs will be enough to do that here.

    Wikipedia has a good overview of the methods.

    https://en.wikipedia.org/wiki/Soft_body_dynamics

  • Just a guess, but i'd assume that setting is for making the other file format. However you can check if the ogg is re-encoded by saving the capx as a folder and comparing the size of the ogg you imported and the one in your project folder.

  • One way to do it is to check if every point on the one object is overlapping an instance of a second object. Think loops with a couple "overlapping point" conditions. This can be slow checking every frame or even every time an object is placed on top so if you use an array to store the polygon area you can progressively do it by smaller area checks. Keep in mind this is based on collision polygons so something visually covered may not calculate as being so.

    https://www.dropbox.com/s/bitbk9af918us ... .capx?dl=1

    /examples33/overlap_pixels_poly.capx

  • If it helps all mirroring does is make the width negative. So when mirrored at 0 degrees the sprite will appear to face left. Of course this is something you could test and see.

  • The object being drawn is the source and what's already been drawn is the destination. If you use the "force own texture" on a layer then for objects on that layer the destination is only what's been drawn on the layer.

    The paster/canvas plugins can be used to isolate what's being drawn where in cases where layers with their own texture isn't enough.

  • Using tilemaps sounds inefficient for that. Here's the way to do it using a layer and four sprites with the destination out blend.

    https://dl.dropboxusercontent.com/u/542 ... _quad.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:3q64psj0]...without having to make C2 loop through all the instances.

    The pick nth instance doesn't loop through all the instances, it just picks the instance directly.

  • Prominent

    Here's the working script for the latest nw.js:

    "var win=nw.Window.get(); win.on('close', function() {c2_callFunction('nw.js close',[]); win.close(true);});"

    I had forgot to make it actually close after the trigger. You can change 'nw.js close' to any function name you want to use.

  • There really isn't a way to do it manually. Well a very hacky way could be to have a square Sprite and a triangle Sprite. Then you take the for points and figure out how to make it out of rectangles and triangles with the requirement that the triangles can't be scaled up.

    Another could be to have four scaled sprite with the destination out blend to erase parts of a colored Sprite.

    But really those plugins add features that aren't doable with vanilla c2.