Re: spawning something and keeping track of it too (SOLVED: ez)
Bad Boy wrote:
You probably shouldn't have to do that ToAEmitter there but whatever, CC's finicky so maybe you do.
You should use local variables though, with lua if you don't use the local keyword (or put them in self or some other table) your variables will be declared in the global namespace which is kinda messy.
if just sfx = self.enginesound or the other way around then for some reason sfx becomes nil and cant be spawned or controlled it's weird
also yeah i ended up doing self.x on everything once it started having issues with multiple of the same gun