Working on the above tutorial and have run into an issue.
I have been over this more than once but am unable to see my own mistake.
Here is the update code:
function update(self, dt)
if self.moving then
local pos = go.get_position()
pos = pos + self.dir * self.speed * dt
go.set_position(pos)
end
if self.firing then
factory.create("#rocketfactory")
end
-- reset start
self.input.x = 0
self.input.y = 0
self.moving = false
-- reset end
end
Here is the console error message:
ERROR:SCRIPT: main/player.script:26: Component expected to be of type 'factoryc' but was 'collectionfactoryc'
stack traceback:
[C]:-1: in function create
main/player.script:26: in function <main/player.script:18>
Any help is appreciated.
Thanks,