I’ve used the following code for about 2 weeks with previous betas, but now it doesn’t seem to work.
Simulator shows something like: “Warning: Attempting to nil property(n)…”
[lua] cleanThisGroup = function ( event )
print ( “cleaner 1.” )
for i = nameGroup.numChildren , 1 , -1 do
local child = nameGroup[i]
nameGroup.parent:remove ( child )
end
for i = nameGroup.numChildren , 1 , -1 do
nameGroup[i] = nil
end
end[/lua]
I’ve read this code here, but I don’t remember where.
So now it doesn’t seem to work, at least the second part. I think that the game is able to remove objects from groups, but it doesn’t nil them.
Thanks!
[import]uid: 7022 topic_id: 1587 reply_id: 301587[/import]
Thanks tarenberg, I figured out it before going to sleep so I couldn’t reply. Ansca you did a wonderful work! My congrats for this feature.