Mit #appendto kann man ein bereits existierendes Script einer Objektdefinition ändern ohne die Originaldatei ändern zu müssen. Zum Beispiel könnte ein Szenario Flints mit einem größeren Explosionsradius explodieren lassen ohne den ganzen Flint in das Szenario kopieren zu müssen.
A script can append itself to one or multiple existing scripts using the
#appendto
directive. Such script needs to be placed in System.ocg directory. Functions of the same name will overload functions in the target script. The original overloaded functions can still be called using
inherited. #included scripts are not appended with #append, but #appended scripts are included by #include.
Ein Script kann beliebig viele #appendto enthalten. Es wird aber immer selbst mit kompiliert. Dies ist besonders dann entscheidend, wenn benannte Locals oder Funktionsnamen aus dem Script, an das angehängt wird, verwendet werden.