I want to sent information about an event to the console via print(i), but with no luck. The event is called with
[lua]Runtime:addEventListener( “collision”, onCollision )[/lua]
The function:
[lua]local function onCollision( event )
if ( event.phase == “began” ) then
print(“began”)
print("event.object1: “…event.object1)
–for i,v in ipairs(event) do print(”**: "…i,v) end
–print("event.object1: "…tostring(event.object1))
–print("event.object1._class “…event.object1._class[0])
–for i=0, #event.object1.getmetatable do print(”**: "…i, event[i].object1.getmetatable) end
elseif ( event.phase == “ended” ) then
–print( "ended: " … event.object1 … " & " … event.object2 )
print(“ended”)
end
end[/lua]
As you can see, I tried several version with print (the one commented out), but they all do not get the expected result. Even the ipairs(event) are not called and other things I tried just gave me the keys of the metatables. Is there a way, to “inspect” everything, that is insight the event-table? [import]uid: 75471 topic_id: 12310 reply_id: 312310[/import]