Oncollide unfunctionable *Never Mind*
Posted: Sun Sep 06, 2009 7:13 pm
I tried checking the code frequently and found it to fail each time. I even transferred the code to another object that the box will collide with. I have the box hitting the oncollide box on a hinge. Idk if this is affecting it but I get this error a few times in the scene.
- - Warning: FixJointEntity:: add to simulation had body not in sim
But now that I think about it that could be in another scene I made where I created fixjoints.
Here is the code that seems as if it was never there...
Any help would be greatly appreciated. I shall even post the end result on algobox and here if you would like.
EDIT: Oh wow... I feel really dumb... I missed e.pos so nvm this thread is useless sorry for the mistake
- - Warning: FixJointEntity:: add to simulation had body not in sim
But now that I think about it that could be in another scene I made where I created fixjoints.
Here is the code that seems as if it was never there...
- Code: Select all
(e)=>{
scene.addcircle({ collideset := 4; radius := 0.4; color := [0.5, 0.5, 1, 1]; restitution := 1; oncollide := (e)=>{ e.other.team == 2 ? { e.other.hp = e.other.hp - 40; e.other.hp <= 0 ? {e.other.density = NaN} : {}; e.this.density = NaN } : {}; e.other.team == 0 ? {e.this.density = NaN} : {} }; drawborder := false; drawcake := false }) }
Any help would be greatly appreciated. I shall even post the end result on algobox and here if you would like.
EDIT: Oh wow... I feel really dumb... I missed e.pos so nvm this thread is useless sorry for the mistake