R0J0hound's Forum Posts

  • You could do a sandy shore with another pass of your array.

    If 0 is water and 1 is sand in your array you can make the shore with:

    +----------------------------------------------+
    | array: for each xy                           |
    | array: value at (self.curx, self.cury)<>0    |
    +----------------------------------------------+
      +--------------------------------------------+
      | array: value at (self.curx-1, self.cury)=0 |array: set value at (self.curx, self.cury) to 1
      | or                                         |
      | array: value at (self.curx+1, self.cury)=0 |
      | or                                         |
      | array: value at (self.curx, self.cury-1)=0 |
      | or                                         |
      | array: value at (self.curx, self.cury+1)=0 |
      +--------------------------------------------+[/code:1t6b4dac]
  • This topic might help:

    It has a capx that separates the decoration tiles into a second tilemap with events.

  • So basically you want to copy a sol from one family to the other. Typically there is better logic than doing that but if you must i can think of a few ways:

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

    If only one object is picked of group1 then "group2: pick by uid group1.uid"

    If multiple objects are picked in group1 copying it over will take two events. One to mark the instances so that group2 can pick then and a second to make group2 pick them.

  • This bug will probably be closed then. Without a capx the most that can be done is recreating a project an seeing it works, as you have done. The full project isn't useful for the report either, but since it works in a new project the bug is likely with your events.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.