Hi there. I’m using game edition alpha and trying to remove ‘cities’ when they get hit with a bomb or a bullet. I’m trying to use table listeners to have the cities report when they are hit, and then remove themselves. It seems to work okay but after playing for half a minute or so, the simulation crashes with the following error:
Assertion failed: (0 \<= proxyId && proxyId \< m\_nodeCapacity), function GetFatAABB, file ../../external/Box2D\_v2.1.2/Box2D/Box2D/Collision/b2DynamicTree.h, line 141.
/Applications/Corona Game Edition Alpha 1/Corona Terminal: line 9: 11564 Abort trap "$path/Corona Simulator.app/Contents/MacOS/Corona Simulator" $\*
logout
Here’s the code I’m using -
local function onLocalCollision( self, event )
print("city one or two got hit")
self.parent:remove(self);
self.isBodyActive = false;
end
city1.collision = onLocalCollision
city1:addEventListener( "collision", city1 )
city2.collision = onLocalCollision
city2:addEventListener( "collision", city2 )
Any advice is appreciated.
Nick [import]uid: 5232 topic_id: 1383 reply_id: 301383[/import]
