The first bit of code is where I set up a collision event listener for my object. In build 268 everything works as expected. I am trying out the daily builds with no success on this project at all. I can get the item names and this is reported correctly. When it gets to the point of removing an item from screen the simulator crashes with any of the daily builds. Can anyone see what I am doing wrong that the daily builds would not like. I tried the display.remove(object) mentioned in one but had the same issue.
Cheers
Mike R
myObject.collision = destroyObject
myObject:addEventListener(“collision”,myObject)
[code]function destroyObject(self,event)
if gameActive == true then
local item1 = self
local item2 = event.other
if event.phase == “began” then
print (item1.name)
print (item2.name)
if item2.name == “Star” then
print ( item2.name) – Is the correct object.
item2:removeSelf()
item2 = nil
elseif item2.name == “Spike” then
splotX = self.x
splotY = self.y
item1:removeSelf()
item1 = nil
splatObject()
end
end
end
end
[import]uid: 9950 topic_id: 7719 reply_id: 307719[/import]