I've almost finished a completely script self contained script for creating a number display, and to change the displayed number, I have to remove the lights and create them again. The only way to remove them is set the duration very low and have them time out, but even setting the duration to zero will have them still existing when the script does everything instantly. I didn't want to have to rely on extra external timers to make sure everything happens right, so a tried to make each script spawn it's own. There where my other problem is:
Code: Select all
spawn("timer", self.level, self.x, self.y, 3, "self.name".."time")
time = findEntity("self.name".."time")
time:setTimerInterval(0.1)
time:addConnector("activate", self.name, "makelight()")
time:addConnector("activate", self.name, "test()")
function test()
print("succsess")
end
time:activate()
I know it doesn't have anything to do with the naming, because it tried with static names as well. I'm not getting errors, but I still can't seem to get the timer to do anything.