(05-14-2013, 03:08 PM)JustAnotherPlayer Wrote: Um no. I've seen some scripts where the global.hps is used for scripting.
nvm statyk says so
*edit*
I just tried to do some class type thing and it doesn't seem to work in the global sense. Which is what you were going for, I suppose. Now, you could just copy&paste the class to each script file, but that might be arduous/sloppy/beyond the scope of practicality.
class TestClass
{
//Constructor, basically an OnStart
TestClass()
{
//This is called when you create an instance of this class
}
//You can put methods etc beyond this
//Example of a method
void/whatever return type Method(parameters etc)
{
//Do stuff and things
}
}
void OnStart() //The actual game script starts here, like always
{
//Create an instance of the TestClass class
TestClass TestingClass; //You can do this outside of OnStart etc, I believe
//You can call methods like so
TestingClass.Method(arguments etc)
}
Like I said, beyond the scope of practicality.