dop2000's Forum Posts

  • It's probably implied because one object can't be in a hierarchy.

    After you've created a hierarchy you can edit hierarchy settings for child objects on the properties bar.

  • If you have suggestions about conditions that would allow the system to ask "is X pending", that would be a great boon to me.

    It depends on the implementation. You can store all these skills in some data object, like an array or JSON. In this case you can read the array/json in a loop and check the "pending/completed" value of every record. If you decide to go this route, I strongly suggest JSON.

    Another option (which is less 'professional' but is actually easier to do in Construct) is to use a sprite with instance variables. Say, if there are 20 different skills in the game, you can put 20 instances of SkillSprite on the layout. They will only be used as data storage and can be invisible. For each SkillSprite instance you define a bunch of variables, for example SkillType=magic, IsSelected=true, IsProcessed=false, Priority=1 etc. Then in your functions you can easily filter and pick these instances. For example, this block of conditions will pick the next pending magic skill:

    SkillSprite compare value SkillType="magic"
    SkillSprite compare value isProcessed=false
    SkillSprite pick by highest priority
    
  • I would probably do something like this:

  • If you export with NWJS, enable Devtools checkbox when exporting. Then in black screen press F12 and check errors in console log.

  • You do not have permission to view this post

  • Try changing zoom level in your browser to 100%.

    Try another browser.

    You can also preview projects using keyboard shortcuts F4, F5, Shift+F4, Shift+F5.

  • Just to confirm this is where you want me to put this right?

    Sorry, I was wrong, the snapshot size needs to be in device pixels. And your formulas there were working.

    DrawingCanvas is required to change the resolution. You can use "set resolution" action, and the image will be exported with that resolution. The canvas and the sprite need to have the same origin point position.

    dropbox.com/scl/fi/iolct3pft9f9il8wvnwoh/ScreenShot-question2.c3p

  • You can use an invisible camera sprite with ScrollTo behavior and move it using MoveTo or Bullet behavior. Or change scrollY on every tick. Check out the official examples.

  • All the steps work, the file is saved. You just need to find the right formulas to calculate the resolution.

    I can tell you that LayerToCanvasX and LayerToCanvasY conversions are not needed. When taking a snapshot simply specify X=Sprite.BBoxLeft, Y=Sprite.BBoxTop, Width=Sprite.width and Height=sprite.height

    But then you need to resize the sprite and canvas to the right resolution before pasting.

    Check out this post, maybe it will be useful:

    construct.net/en/forum/construct-3/general-discussion-7/canvas-snapshot-layertocanvas-168819

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Most of these actions are asynchronous - if you see a little clock icon to the right of the action, it means that the result will be delayed and you need to use an appropriate trigger (like "On Canvas Snapshot") or "Wait for previous action to complete". I suggest you study a few tutorials.

    So the correct sequence is something like this:

    System make snapshot
    Wait for previous action to complete
    Sprite load image from CanvasSnapshot
    Wait for previous action to complete
    Sprite set position to DrawingCanvas
    Sprite set size to ...
    DrawingCanvas Paste Sprite
    Wait for previous action to complete
    DrawingCanvas Save Image
    Wait for previous action to complete
    Browser download DrawingCanvas.SavedImageURL
    

    None of these actions should be run on every tick!

  • Try searching the forum, there may be similar examples.

    You might also need to use PlatformInfo expressions for resolution calculations.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/platform-info

  • You can load the screenshot into an empty sprite, resize the sprite to your desired size and screenshot it again. Or paste the sprite onto a drawing canvas and save the image from the canvas.

  • You don't have to spawn body parts, they are created automatically when you create the body, because you have "create hierarchy=true". And you only need to pin once, not on every tick.

    Try this:

  • I found this solution - add these lines to package.json

    "icons": {
     "256": "icons/icon-256.png"
    },
    

    If you ticked "package assets" option on export, package.json will be inside package.nw archive.

    I think Scirra need to update their export to include these lines automatically.

  • But the problem occurs when the user hits the spawn button again, the pin only attached to the firstly spawn object only.

    When you spawn an object, in a sub-event pick its arm and hand using "Pick child" condition.