Problem with addevent listener

Hi!

I want to toucha a line when an another line have a collision with that. so i put this.

local function onCollision(self,event)

if(event.other.name==“limite”)then

 Fondo:addEventListener(“touch”,temporizador2) 

end

end

But after the first collision, when i touch Fondo, its go to temporizador. I only want , when the collision is with limite, and no whatever.

Thanks

Be aware that putting physics bodies onto lines generally doesn’t work because they are too thin to be detected during collisions properly.

Also, please post more complete code and use the <> button to display it with line numbers in your forum post.

/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/storyboard/storyboard.lua:1613:?:0:attempt to index field ‘?’ ´(a nil value)

Appear this error

this error when i want to play in my personal phone , but not in the simulator

Can you post the rest of the error? There should be a full stack trace in the following lines.

Rob

Be aware that putting physics bodies onto lines generally doesn’t work because they are too thin to be detected during collisions properly.

Also, please post more complete code and use the <> button to display it with line numbers in your forum post.

/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/storyboard/storyboard.lua:1613:?:0:attempt to index field ‘?’ ´(a nil value)

Appear this error

this error when i want to play in my personal phone , but not in the simulator

Can you post the rest of the error? There should be a full stack trace in the following lines.

Rob