R0J0hound's Recent Forum Activity

  • Scroll down on the properties and click "Make 1:1" to correct that.

    Typically you shouldn't get values like that. I've gotten decimals like that when I change sizes of scaled objects or something like that. But I don't understand how that occurs for unscaled objects.

  • Here's how you can run the version of construct that "epic platformer" says it needs to run.

    editor.construct.net/r251-2

    From the description of that template it uses a lot of third party plugins. Some of those plugins were ported to c3, but there was change after r251.2 that requires more involved updates to get those plugins working, and the original authors of the plugins aren't working on them anymore.

    Some folks avoid third party plugins completely and just stick with plugins included in Construct. I post examples on the forum all the time and even though i primarily use C2 most all of the examples can be opened and work in C3, except for some cases.

    Anyways, if you decide to try to keep learning construct I'd recommend first trying the free templates and examples bundled with Construct. They are maintained so you don't have to worry about getting them working. The forum is also a good resource for finding examples of solutions to various things. Personally I haven't used the asset store at all, but quality and support can vary from the looks of it.

  • Here's a way to do the trimming.

    uc2d7ba9b291dcd095dee8f8756e.dl.dropboxusercontent.com/cd/0/get/CiDjIoup1wMqIaDJBRjNUlxZwM6cLG5aH5CTC4BhQjWcCuHW9PCeXBEAredxEszawe0iJl77yfopcGSepQcVd6iKtxM-T32q7407d3og5a5QmzMJAe86FBcVs19tFhkflgxLa8om4TgKfglboiCT3nyz/file

    It amounts to scanning the whole array and finding the min/max of x/y for any cell containing a value. Then the the values are shifted over and the array is resized.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Else when used with object conditions may not do what you want.

    Sprite: x<100
    — do something
    Else
    — do something else. No sprites are picked

    One possible solution is to use the system compare condition instead of object conditions so you take picking out of the situation. Bear in mind this would work because there’s only one player object.

    So from this

    Compare: obj = “axe”
    Player: slotfull<6
    — place in inventory
    Else
    Compare: obj = “axe”
    Player: slotfull=6
    — place on ground

    To this

    Compare: obj = “axe”
    Compare: Player.slotfull<6
    — place in inventory
    Else
    Compare: obj = “axe”
    Compare: Player.slotfull=6
    — place on ground

    But there are other ways to structure it. You don’t always need an else. I’d probably go for something like this

    Compare: obj = “axe”
    — Player: slotfull=6
    — — place on ground
    — Player: slotfull<6
    — — place in inventory
  • Also it’s possible replicate a cube with mesh distort. Then with a bit of math you can rotate it any way you like.

    construct.net/en/forum/construct-3/your-construct-creations-9/example-mesh-distort-sphere-161470

  • Well there is a depth buffer, and transparency does mostly work in 3D. Not always though.

    You can rotate the corners with a bit of math. It’s just a matter of applying them to a distort mesh.

    One idea place four sprites at

    -32,-48

    32,-48

    32,48

    -32,48

    These will serve as our points. Give them three instance variables z, Newx and newz.

    then you can rotate them with:

    var a=0
    var sa=0
    var ca=0
    
    every tick:
    — set a to time*10
    — set sa to sin(a)
    — set ca to cos(a)
    -- sprite: set newx to self.x*ca-self.z*sa
    -- sprite: set newz to self.x*sa-self.z*ca
    
    every tick
    — card: set size to (1,1)
    -- card: set distort mesh to 2,2
    -- set distort at 0,0 to card.x+sprite(0).newx, card.+sprite(0).y, 32+sprite(0).newz, -1,-1
    -- do the same for the other points: 
    0,1 with sprite(1)
    1,1 with sprite(2)
    1,0 with sprite(3)

    sorry i trailed off with the bit where you set the distort points. generally youd have card have a size of 1,1 and place the points with absolute. Unless something changed you can’t use a negative z for a distort point, so you’d need to shift things a bit higher.

  • Cool. Glad that helped.

  • One idea for the jumping would be to relax the spring forces momentarily then make the spring forces stiffer for a bit. But I guess there may be other ideas.

    Making other shapes should be possible, but it just would take more setup. All the rest lengths of the edges, and all the rest areas of the triangles. The other issue is while a grid is easy to texture with distort meshes, other shapes could be trickier.

  • It’s hard to reason about more complicated cases. One thought that comes to mind is objects that are side by side on the x axis may be considered overlapping with that bounding box code. That would throw things off. Maybe shrinking it a bit may help:

    A.bbboxleft is between B.bboxLeft-A.width+1 and B.bbboxRight-1

  • I changed mine so z up is positive and compared what I did with yours:

    yours: dy = (A.y+A.z)-(B.y+B.z)-(A.sy-B.sy)/2
    mine: dy = (A.y+A.z)-(B.y+B.z)-(A.sy-B.sy)/2
    
    yours: dz = -A.z+B.z-(A.sz-B.sz)/2
    mine: dz = A.z-B.z-(A.sz-B.sz)/2
    
    yours: best = ((abs(dy)-(A.sy+B.sy)/2)>((abs(dz)-(A.sz+B.sz)/2))?dy:dz
    mine: best = ((abs(dy)-(A.sy+B.sy)/2)>(abs(dz)-(A.sz+ B.sz)/2))?dy:dz

    It's just your dz equation that is off. The rest looks correct from what I can tell.

    You can do your own bounding box check if you want to reserve the collision poly for collisions. These two conditions would do that:

    A.bbboxleft is between B.bboxLeft-A.width and B.bbboxRight
    A.bbboxTop is between B.bboxTop-A.Height and B.bbboxBottom
R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound