Initialising Global Structures
I have a simple structre that I have registered with the script and I ideally want to be able to initialise global variables of the struct type. For example
BodyProperty planet = {"Earth", "Human"};
Is it possible to do this or should I just initilise the variables in a function call later (which i would prefer not to do)?
Thanks
Spree
I'm not aware that AS supports that array initialization syntax, which can't be used anyhow as you aren't initializing an array.
The best you can do is to register constructors that take the necessary arguments to initialize the structure.
BodyProperty planet("Earth", "Human");
I have plans to implement initializer lists for arrays, maybe even for structures, but this is quite low priority right now.
BodyProperty planet("Earth", "Human");
I have plans to implement initializer lists for arrays, maybe even for structures, but this is quite low priority right now.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement