R0J0hound's Recent Forum Activity

  • Not sure. It’s an issue with the physics behavior. It jumps because it can take a frame to update the collision shape or something.

    In the past doing things like making the objects immovable for a frame helped. You’ll just have to fiddle with it.

  • Here are two other examples. On discord there were some other examples using other ways too.

    dropbox.com/s/i7vrebn55xor8p5/mesh_slice.c3p

    dropbox.com/s/cra289zoqzdfiui/tiledbg_slice.c3p

  • Sorry, I don't have that behavior installed and those are too many events to sort though. The idea was to get you started but likely you'll need to extend it or fix it. What you're basically doing is making a platform behavior.

    Here's another more complete example in 2d. It's still rough, but should help show some ideas with how to implement it. Or how not to, it could be too rough. In general I don't think I'll be perfecting it so hopefully it's helpful in some way.

    dropbox.com/s/9kiu6a4gm896qkq/rough_event_base_platform.capx

  • Events are a bit quirky. Here's a slight variation.

    dropbox.com/s/vivuxtpf99f5o5r/red_around_green.capx

    Also from my knowledge of how picking works your events shouldn't be working, and didn't test as working in C2. If picking logic is changing in C3 then my examples will start not working as intended.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The rough logic is to keep track of what block the player is standing on, then when that block is moved you’d move the player the same amount.

    As a simple rough example in 2d you could do this:

    Player overlaps platform at offset 0,1
    — set platform.x to platform.x+1
    — set player.x to player.x+1

    There are probably more precise ways to get what the player is standing on. That and you can move the platforms in more deluxe ways. For that you may just want to keep track of the offset the player is from the platform.

  • You either set it up to only create the sprites if the space is free or remove the duplicates after.

    One way is to use an array to keep track of occupied spaces.

    start of layout
    — set array size to 1000,1000,1
    — for each island
    — — array set at island.x/16, island.y/16 to 1
    — for each island
    — — array at island.x/16+1, island.y/16 = 0
    — — — create wall at island.x+16, island.y
    — — — set array at wall.x/16, wall.y/16 to 1
    … same for other directions

    You could also use a tile map instead of the sprites for similar results. Probably could end up simpler.

    Another idea is to clean up the duplicates after.

    start of layout
    For each island
    — create wall at island.x+16, island.y
    — …other directions
    
    Start of layout
    Wall overlaps island
    — destroy wall
    
    Start of layout
    Repeat wall.count times
    Wall: x=wall(loopindex).x
    Wall: y=wall(loopindex).y
    Repeat wall.pickedCount-1 times
    Pick random wall instance
    — destroy wall
    

    At least those are two methods. Another could be to store xy pairs of created walls in a dictionary and check if a location is listed before creating.

  • oraflame

    Glad it helped.

    sarierdnc

    Best to create a new topic. Generally I’m unavailable but when I am I’d just skim all the posts and reply to those that interest me, I have time for and I actually can solve. That said there are many other talented people on here that like to help out too. So a new topic is your best bet.

  • X=100*cos(ang)

    Y=100*sin(ang)

    For any angle.

  • There’s a newer version of this floating around but it must be on another topic.

    Anyways to decide what face is on rope you can do a dot product with all the face normals and the one that’s the most positive is on top.

    Typically you’d calculate the normal using three vertices from each face and doing a cross product. However since it’s a cube you can get the normal from just two vertices: one one the face and one on the opposite side of the cube.

    The strategy I’d go with is make a list of those two vertices for each face and put them in an array sized 6,4,1.

    At(I, 1) would be the first vertex, at(I,2) would be the second. For bookkeeping you’d set at(I,3) to the face value. You’d set at(I,0) to the dot product of each pair to the ground normal. Roughly:

    Dot= (v2-v1) dot vec(0,0,1)

    Then you’d sort the array and the first index will be the top face.

    That’s the general idea at least. It’s just busy work to work that out. Another idea would be to calculate the orientation and work out a formula to spit out the top face.

  • I mean you can do what you did there, screenshot the layout. You could then crop it to the layout area and scale it to what you have as the layout size in the image editor.

    An event way to possibly do it to set the canvas size to be the same as the layout size and use the snapshot canvas action to get an image. There may be some finickiness to deal with such as waiting a tick for things to update before snapshotting. You may also need to turn off full screen scaling. There may be other issues but i'm not sure. I've had issues in the past of capturing everything that way.

    Another way to snapshot the canvas one screen at a time, and then piece them together later.

    Either way you may end up with a rather large image which will be slower to download and take up more vram. It doesn't mean you can't do it but generally most games have reusable images that they place all over the level for decorations.

  • Here's one way to do it:

    dropbox.com/s/2j144iheff6rrde/lines_between_sprites.capx

    The only finicky bit is having to use pick all before being able to pick a different instance.

    Here's a variation that uses two instance variables which is a bit cleaner imo.

    dropbox.com/s/5w5xwxi1nnvgm8g/lines_between_sprites2.capx

  • You have to set the texture from a sprite every tick, or at least every time the frame changes. Otherwise it will remain on the last texture used.