– I have a class
[code]
function angledGun.new() – constructor
local newAngledGun = {
display = display.newImageRect(“arrowLeft.png”, 50,50),
id = 1,
}
return setmetatable( newAngledGun, angledGun_mt )
end
–This also has a property not seen here… .name = “angledGun”
function angledGun:test()
print(“test”)
end
–And Im trying to do this in another part of the code
local function bulletCollision(self,event)
if event.other.type == “weapon” then
print(event.other.name)
event.other:test()
–event.other.display:test() << this also does not work
end
end
–Im able to get the print statement to print off “angledGun”
–but cant get the method to work???
[/code] [import]uid: 28912 topic_id: 34257 reply_id: 334257[/import]