Construct 3 r421

You're viewing a single comment in a conversation. View all the comments
  • 3 Comments

  • Order by
  • I saw them but they took info from whole frame/layers.

    Can I take snapshot of the frame just for certain objects or layers?

    If not, those expressions will get wrong color.

    For example lets take scene: color sprites with 50% opacity on top of ground image. SnapshotRedAt(x, y) will count RGB of the ground too but only RGB of sprites needed.

    Since I could not sample color directly from layer my idea was to use canvas as way to draw color info there and sample it from there somehow.

    • Paste just the objects you want into the canvas, take the snapshot, then sample the pixels. e.g.

      -> Paste object Sprite with effects

      -> Save snapshot

      -> Wait for previous actions to complete

      -> Log in console: DrawingCanvas.SnapshotRedAt(0, 0) & " " & DrawingCanvas.SnapshotGreenAt(0, 0) & " " & DrawingCanvas.SnapshotBlueAt(0, 0) & " " & DrawingCanvas.SnapshotAlphaAt(0, 0)

      • Oh my, NOW I get it!

        Somehow I thought of 'snapshot canvas' from System actions. Now I see that Drawing Canvas have its own snapshot that does everything I asked for.

        Thank you for your patience!