I seem to have a problem when destroying a vent group in the exit scene of a storyboard, although destroying single vents (not groups) is working. I went on to make a simple test program as follows:
display.setStatusBar(display.HiddenStatusBar) local storyboard=require("storyboard") local scene=storyboard.newScene() local CBE = require("CBEffects.Library") local ventGroup = CBE.newVentGroup{ { preset = "evil", title="one", x=display.contentCenterX, y=display.contentCenterY, }, { preset = "evil", title="two", x=display.contentCenterX, y=display.contentCenterY+200, }, { preset = "evil", title="three", x=display.contentCenterX, y=display.contentCenterY-200, }, } local function stopVent() ventGroup:stop("one", "two", "three") storyboard.gotoScene("level2") end function scene:createScene(event) local group=self.view ventGroup:start("one", "two", "three") timer.performWithDelay(3000, stopVent) end function scene:enterScene(event) local group=self.view end function scene:exitScene(event) local group=self.view ventGroup:destroyMaster() ventGroup=nil end function scene:destroyScene(event) local group=self.view end scene:addEventListener("createScene", scene) scene:addEventListener("enterScene", scene) scene:addEventListener("exitScene", scene) scene:addEventListener("destroyScene", scene) return scene
Upon exiting the scene, this error message pops up:
File: CBEffects/cbe_core/core.lua
Line: 100
Attempt to call upvalue ‘vents’ (a table value)
What am doing wrong?