Hello,
I would like to use types for handling baddies in my game but if I create my new types in a function it's not possible to declare them as 'global' and then I get an error message at compile time when I try to access them from within another function.
Am I missing something or should I create them as global at the beginning of my program (but then it's not very dynamic as I cannot create the amount I need for each level nor delete them when they're 'dead'). Or should I use subroutines instead of function ?
Thanks for any help :)
Claude
I would like to use types for handling baddies in my game but if I create my new types in a function it's not possible to declare them as 'global' and then I get an error message at compile time when I try to access them from within another function.
Am I missing something or should I create them as global at the beginning of my program (but then it's not very dynamic as I cannot create the amount I need for each level nor delete them when they're 'dead'). Or should I use subroutines instead of function ?
Thanks for any help :)
Claude