I have no experience with joints whatsoever (except for a sore knee), but what might work is to have
a function spawn a weight and increment a variable simultaneously.
[lua]local totalWeight = 0
local function spawn (e)
if e.phase == “ended” then
local weight1 = display.newImage(“anvil.png”)
totalWeight = totalWeight+10
end
end[/lua]
then you would remove a joint after totalWeight reaches desired amount:
[lua]local function break(e)
if totalWeight == 100 then
if specificJoint then
removeJoint end
end
end
Runtime:addEventListener(“enterFrame”, break)[/lua]
And that’s it. I don’t know if this will work, but it’s worth a shot.
Good luck,
J.K.
[import]uid: 66117 topic_id: 17420 reply_id: 65965[/import]