![]() |
![]() |
|
#1
|
||||
|
||||
|
Is there any possibility to implement functionality of C++ preprocessor directives in UnrealScript?
I want to do something like this: Code:
//uncomment the line below to make the mutator ServerPerks-compatible #define SERVERPERKS #ifdef SERVERPERKS class MyHumanPawn extends SRHumanPawn; #else class MyHumanPawn extends KFHumanPawn; #endif |
|
#2
|
||||
|
||||
|
Hmm, that could be handy.
__________________
Whisky's Workshop ![]() "As you can see here, I'm -ALL ON MY F***ING OWN! Guys where the hell are you?!" |
|
#3
|
|||
|
|||
|
You mean this?
http://wiki.beyondunreal.com/Legacy:UCPP |
|
#4
|
|||
|
|||
|
what would you do with those?
|
|
#5
|
||||
|
||||
|
Quote:
|
|
#6
|
||||
|
||||
|
Probably you can use UCPP from UE3...
Or, you can use a C preprocessor. For instance, using GCC as preprocessor: - somefile.puc: Code:
#include "conf.h"
class SomeClass extends Actor;
function PostBeginPlay()
{
#ifdef DEBUG
log("PostBeginPlay!");
#endif
}
Code:
#define DEBUG gcc -E -x c -P -C somefile.puc Output: Code:
class SomeClass extends Actor;
function PostBeginPlay()
{
log("PostBeginPlay!");
}
__________________
Bonus Stage/Boss Time Mutator Pickup class for the Holy Hand Grenade Door messages Mutator My KF Public Server: Sexta Bruta Hardcore Server |
![]() |
| Thread Tools | |
| Display Modes | |
|
|