R0J0hound's Recent Forum Activity

  • "on post collide" is only triggered when two objects first collide (useful for sound). I need to add another condition to loop over all the collision pairs so you can check at any time.

  • Prominent

    Here's a proof of concept in events to see how it would handle. The result is decent, but it becomes much more complex if we wanted to use tile collision polygons. It would also take a while to implement this in a good js way. So long term I may implement something into the behavior but not at the moment.

  • Update 1.9:

    Download in first post.

    * Fixed: If a shape or joint was destroyed more than once it would crash.

    * Fixed: Expressions would sometimes return undefined if there wasn't any value. Now 0 is returned.

    * Added: "set joint properties" action to change joint specific properties after the joint is added. Things like spring stiffness, pin distance, etc ... see note[1]

    * Added: A bunch of expressions to get those joint specific properties: see note[1]

    joint_PinDist(tag)

    joint_SlideMin(tag)

    joint_SlideMax(tag)

    joint_SpringRest(tag)

    joint_SpringStiff(tag)

    joint_SpringDamp(tag)

    joint_RotaryLimitMin(tag)

    joint_RotaryLimitMax(tag)

    joint_RatchetAngle(tag)

    joint_RatchetPhase(tag)

    joint_RatchetRatchet(tag)

    joint_GearPhase(tag)

    joint_GearRatio(tag)

    joint_MotorRate(tag)

    * Added: An expression to get the joint's type as text: jointType(tag)

    * Added: Expressions to get the points that a joint connects to the objects. Either the current object or the other one:

    jointAnchorX(tag)

    jointAnchorY(tag)

    jointOtherAnchorX(tag)

    jointOtherAnchorY(tag)

    Note [1]:

    If the action or expression used doesn't match the joint type then the action will do nothing and the expressions will return 0.

    Prominent

    Line segments might help with that but I currently have no plans to implement it.

    You could bevel the player's collision polygon a bit.

    -cheers

    Edit:

    Last minute fix. Re-download version 1.9.

    * Fixed: "Enable/Disable" and "Set immovable" actions would crash trying to remove a shape more than once.

  • Is the trigger function throwing the error? What does alert(this.runtime.trigger) give you?

    Edit: you can call the function but since the calling function isn't part of the instance object, "this" isn't an instance so it doesn't have this.runtime.

    If your object only ever has one instance you could add a global var that you set in your onCreate function to be "this", then you can use the var instead in your function.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need one of the connected objects to get info about a joint. Makes sense since event sheets rely on picking, not to mention that's how chipmunk organizes the joints. I can add expressions to get the anchor point of the current object and the connected object. That would save needing to pick the other object.

  • That would be useful. Should the x and y returned be in layout coordinates or relative to the objects? I'm leaning towards "layout" but relative would be constant.

  • Here's a way to find all the tiles a box object is currently overlapping.

    If you want to check against a different collision shape and/or with a rotated shape then try the second one.

    It's also possible to use tiles with non-box collision polys but you just need to set the tile sprite accordingly.

  • Update 1.8:

    * Fixed: changing object shape then attaching a joint in the same frame was positioning incorrectly.

    -cheers

  • You could use something like the separating axis theorem with the collision polygons to find it if you need to.

  • I believe I found the issue. The shape isn't updated till the next frame. I just need to update it if needed when adding joints. It appears to be working, but I need to test a few more things. It should be ready tomorrow.

  • I guess it may be graphics card specific? I don't see quality reduction on my machine.

  • Updated to 1.7a:

    * Fixed: Edittime.js typo

    * Fixed: Error when adding joints on "post collide"

    Prominent

    I can't wrap my head around that resizing then adding a joint bug. For now waiting a tick before adding the joint to the resized object works. I'll have to re-visit it later.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound