Bl4ckSh33p's Forum Posts

  • Thanks! This could work, I will try a tilemap. :)

  • Hi! The actions only have a scroll to bottom action. Is there a way to scroll to top after changing the text?

    I use the textarea to display long descriptions in a scrollable area on screen.

  • Hi! I tried to save a color palette to a canvas and then get the color value at the touch position. But it's always returning 0 for red, green and blue values. Why?

    + System: On start of layout

    -> DrawingCanvas: Paste object ColorPalette with effects

    -> System: Wait for previous actions to complete

    --------------------------

    + Touch: On tap gesture on ColorPalette

    -> System: Set LastTouchX to floor(Touch.X)

    -> System: Set LastTouchY to floor(Touch.Y)

    -> DrawingCanvas: Save snapshot

    ----------------------------

    + DrawingCanvas: On snapshot

    -> Sprite: Set color to rgbEx255(DrawingCanvas.SnapshotRedAt(LastTouchX, LastTouchY), DrawingCanvas.SnapshotGreenAt(LastTouchX, LastTouchY), DrawingCanvas.SnapshotBlueAt(LastTouchX, LastTouchY))

    -> Browser: Alert "RED: "&DrawingCanvas.SnapshotRedAt(LastTouchX, LastTouchY)&" GREEN: "& DrawingCanvas.SnapshotGreenAt(LastTouchX, LastTouchY)&" BLUE: "& DrawingCanvas.SnapshotBlueAt(LastTouchX, LastTouchY)

  • Hi! I was playing around with physics and need a ton of physics objects for my idea.

    But after 3-5K sprites it starts to slow down, and I need about 20+ times more of them.

    Is there a way to "bake" the settled / sleeping / immovable objects into one big object? I added some actions to make them immovable after a while and not moving much (sleep does not even activate for immovable objects not interacting with other objects) to improve performance. It helped a lot but it's not enough.

    Then I tried to put them on a drawind canvas with pyhsics enabled but the problem is, it has only one big rectangular hitbox then and does not use a hitbox suitable for the pasted objects.

    Is there any other way to do this? Can I make a "solid" object out of many small objects so physics only interacts with this one?

  • Any suggestions how to solve this? It's not possible to use drawing canvas save and sprite load from url in a loop?

  • Hi!

    When I use hyperlinks to other websites in an iframe and set the target to open a new window the app is just "overwritten" by the browser and showing the website instead of opening a new browser window. (on Android)

    Is this a limitation of the iframe? Is it possible to change this behavior to open a new browser window?

  • So players should be able to select a build/class at launch and then have different guns, right?

    You can make a menu or something where players select their build and store the selection in a global variable. Like a build name. Or add it as instance variable to the player sprite.

    And then just add a condition where the variable is compared to the attack actions. like:

    Build = "Bouncy Bullet" AND Fire button is pressed > Spawn bullet with bounce

    Build = "Shotty" AND Fire button is pressed > Spawn multiple small bullets for Shotgun

    Build = "Bomb" AND Fire Button is pressed > spawn a bomb

    etc.

    Or "On Attack Button Pressed" add sub conditions for every possible build

    On Attack Pressed

    Build = "Bouncy" | Do this

    Build = "Shotgun" | Do this

  • Thanks!

    I found another workaround and instead of an image I just share text now. But I may need it in the future and will take a look at it. :)

  • How did you drain stamina? Remove X stamina while shift is down?

    You can use many different ways but one could be.

    While SHIFT not down and Stamina < MAXStamina

    -- Add x to Stamina

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi! I loaded the 3D Sliding Puzzle example and tried to add one sprite with a big image that is pasted on small drawing canvas objects that are then saved and loaded onto the Collider objects. I added it to the "For each PuzzlePiece" loop. But without a wait the images are not pasted/saved on the drawing canvas and if I add one or more wait actions its completely broken. Pieces move very strange and not to the empty space and no image is shown on the face of the 3d pieces.

    I tried to add the collider UID to the drawing canvas objects to use the "on saved" trigger to load the image, but this didnt work either. It seems pasting the image does not work without a pause after it.

    Any idea how to fix this? Why is the game broken when I use any wait action in the loop? (code below)

    + System: For each PuzzlePiece

    -> System: Create object Collider on layer PuzzlePiece.LayerName at (PuzzlePiece.X, PuzzlePiece.Y), create hierarchy: False

    -> Collider: Set Z elevation to PuzzlePiece.ZElevation + PuzzlePiece.ZHeight

    -> System: Create object DrawingCanvas on layer "Canvas" at (PuzzlePiece.X, PuzzlePiece.Y), create hierarchy: False

    -> DrawingCanvas: Set ColliderID to Collider.UID

    -> DrawingCanvas: Set Index to PuzzlePiece.Index

    -> DrawingCanvas: Set size to (Collider.Width, Collider.Height)

    -> [DISABLED] DrawingCanvas: Move to top of layer

    // Each collider also acts like the surface texture of it parent puzzle piece.

    -> DrawingCanvas: Paste object OriginalImage with effects

    -> System: Wait for previous actions to complete

    -> DrawingCanvas: Save image (PNG, quality 75, offset 0, 0 size 0 x 0)

    -> System: Wait for previous actions to complete

    -> Collider: Load image from DrawingCanvas.SavedImageURL (Keep current size, cross-origin anonymous)

    -> System: Wait for previous actions to complete

    -> [DISABLED] Collider: Set animation frame to PuzzlePiece.Index

    -> PuzzlePiece: Set Front face to use image of Collider

    -> Collider: Set visibility Invisible

    -> DrawingCanvas: Set visibility Invisible

    -> PuzzlePiece: Add child Collider (X: True, Y: True, width: False, height: False, angle: True, Z elevation: True, destroy with parent: True)

    // Store the initial position of each puzzle piece, so the game knows where they must be placed.

    -> PuzzlePiece: Set InitialX to round(Self.X)

    -> PuzzlePiece: Set InitialY to round(Self.Y)

  • The object becomes invisible and I can't find it anywhere. I use the undo button and then cut and paste it on the right layer. 🤔

  • Hi! I tried to reproduce it for a bug report but it didn't happen in a new project, yet. But in several of my app projects I have usually 1 global GUI layer with no parallax and 1-2 normal layers for the objects.

    When I use the properties to change the layer the objects often just vanish. I hit Undo then and just cut/paste the object on the right layer or rarely use right click menu to set a layer.

    Does anyone else have this issue? I don't know how to reproduce it yet but it happens in multiple projects.

    Tagged:

  • Thanks!

    I think I found a workaround for exports in worker mode. The Share plugin has a copy to clipboard button on Android. It's an extra popup (would be nice without it) but it seems to work.

  • Hi! Not sure if this is intended or a small bug but when I enable particle preview in the editor and set a family as particle object, it only shows the first one I added. When I hit the preview in Browser button it spawns different objects.

  • Hi! I hade a very useful javascript to copy text into clipboard but it does no longer seem to work. It just copies the whole jscript into clipboard.

    I think jscript is the only way without a plugin, right?

    Sadly I'm not good at Jscript (yet). Does someone know why it does no longer work or how to fix it? Code below (it's 1 long line):

    (it's in a function with a string as parameter for the text to copy)

    "var myTextBox=document.createElement(""input"");document.body.appendChild(myTextBox);myTextBox.setAttribute(""id"",""myTextBox_id"");document.getElementById(""myTextBox_id"").value=""" & textToCopy & """;myTextBox.select();myTextBox.setSelectionRange(0,99999);document.execCommand(""copy"");document.body.removeChild(myTextBox);"