Hi everyone!
is there a way to declare a "global" enum?
Something like...
enum eMyEnum
{
None = 0,
FirstValue = 1,
SecondValue = 2
}
being able to access the values (not numbers but values) from all scripts (including rooms scripts)
Thanks!
Just declare it in GlobalScript.ash (the header).
This header is put on top of all room scripts.
If you want to use it in multiple custom scripts, put it in the header of the one highest in the tree.
(The same works with variables btw, but if you declare them in the header, each script (and therefore, each room) will have its own independent instance. So if that's exactly what you want, feel free to do that.)