why does this not work…
[lua]local function onCollision ( self, event )
if(self.name == “number_1_tile[” … i … “]” and event.other.name == “ply1Ring”) then
p1sum = p1sum + 1
print(p1sum)
end
end
number_1_tile[" … i … “].collision = onCollision
number_1_tile[” … i … “]:addEventListener (“collision”, number_1_tile[” … i … "])[/lua]
What am I doing wrong here? Does this need to be in the onCollision function as well?
[lua]number_1_tile[" … i … “].collision = onCollision
number_1_tile[” … i … “]:addEventListener (“collision”, number_1_tile[” … i … "])[/lua] [import]uid: 53149 topic_id: 13146 reply_id: 313146[/import]
[import]uid: 53149 topic_id: 13146 reply_id: 48715[/import]