Hi, only need to get my head straight on this. Scripting on another engine so I am a little lost.
I have a Script - call it my SuperGameElement.uc it contains a function array and corresponding static functions.
Example:
static function array<MyTemplate> CreateTemplates()
{
local array<MyTemplate> MyAwesomeList;
MyAwesomeList.AddItem(CreateAwesomeTemplate01());
MyAwesomeList.AddItem(CreateAwesomeTemplate02());
...
}
static function MyTemplate CreateAwesomeTemplate01()
{
filled with awesome-ness
}
Alright, good enough. I don´t want to alter my “SuperGameElement.uc” it might get altered in the future however.
So, how do I subclass to update the function array ?
MyGameElementAdditions.uc
MyGameElementAdditions extends SuperGameElement
static function array<MyTemplate> CreateTemplates()
{
local array<MyTemplate> MyAwesomeList;
MyAwesomeList.AddItem(CreateAwesomeTemplate9999());
}
static function MyTemplate CreateAwesomeTemplate9999()
{
filled with more awesome-ness
}
Somehow, I miss something …
Thanks in advance