PDA

View Full Version : How to modify original code


Snoitkever
31st Mar 2004, 05:14 AM
How do I modify the original UE2R scripts?
I need to add some variables to the Controller and the object class.
I have made some adjustments to the controller and ran UCC

When I compiled my new code UCC gives an error saying:

...
Importing Defaults for MatchInfo
Importing Defaults for ObjectPool
Importing Defaults for TestObj
The file '..\Engine\Inc\EngineClasses.h' needs to be updated. Do you want to overwrite the existing version? (Y/N): Y'..\Engine\Inc\EngineClasses.h' is marked read-only. Would you like to try to force overwriting it? (Y/N): YError exporting Class Core.Object: couldn't open file '..\Engine\Inc\EngineClasses.h'
Success - 0 error(s), 0 warning(s)
Shutting down ucc.exe

Does anyone know how to deal with this?

[SAS]Solid Snake
31st Mar 2004, 05:25 AM
Don't attempt to modify any original classes that have 'native' set in them. They've never compiled properly for me.

ttl
1st Apr 2004, 12:11 AM
They will compile but if its a native class you will have problems with serialization, unless you recompile the headers with the newly generated headers. Hence you cannot add say a hiteffect variable in the material class, as the engine will then crash each time it tries to load a texture. However if you were to apply for the headers, you should be able to recompile it and have it working nicely.


NB: You can add functions to existing native classes, as these dont effect serialization.


Edit:
Also to make it not throw that specific error either press No to outputting the .h file or create the directory ..\Engine\Inc\

Snoitkever
2nd Apr 2004, 07:20 AM
I created the Inc directory and it looks like it works. Thanks ttl!