Gah - a solution with more questions. – EntropicLqd

Difference between revisions of "User:00zX"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m (Proposal - UScripting)
(Proposal - Preprocessor)
Line 45: Line 45:
  
 
--------<br>
 
--------<br>
==Proposal - Preprocessor==
+
[[User:00zX/Using_The_Unreal_Engine_3_Preprocessor]]
===Using The Unreal Engine 3 Preprocessor===
+
 
+
====Including Macro Files====
+
<uscript>
+
class YourPawn extends UTPawn
+
config(YourConfig);
+
 
+
`include(YourMacroFile.uci)
+
</uscript>
+
 
+
=====Example Macro File=====
+
When compiling with the '''-debug''' command line switch, the debug macro will then be defined and will switch our blank spaces to config/exec respectively.
+
 
+
<uscript>
+
`if(`notdefined(Debug))
+
`define dconf
+
`define dexec
+
`else
+
`define dconf config
+
`define dexec exec
+
`endif
+
</uscript>
+
 
+
Copy the above template into a blank text document and call the file YourMacroFile.uci
+
 
+
====Example of usage====
+
If we want to add a variable thats configurable only when the macro `DevBuild is defined.
+
 
+
<uscript>
+
class YourPawn extends UTPawn
+
config(YourConfig);
+
 
+
`include(YourMacroFile.uci)
+
 
+
var `{dconf} bool bCanDodge;
+
 
+
function bool Dodge(eDoubleClickDir DoubleClickMove)
+
{
+
if(bCanDodge)
+
return Super.Dodge(DoubleClickMove);
+
else
+
return false;
+
}
+
 
+
defaultproperties
+
{
+
`if(`notdefined(Debug))
+
bCanDodge=True
+
`endif
+
}
+
</uscript>
+
 
+
=====YourConfig=====
+
<pre>
+
[YourPackage.YourPawn]
+
bCanDodge=True
+
</pre>
+
 
+
====Example of usage====
+
If we want to add a variable that already exists but is not config editable. (PostBeginPlay)
+
<uscript>
+
class YourPawn extends UTPawn
+
config(YourConfig);
+
 
+
`include(YourMacroFile.uci)
+
 
+
`if(`isdefined(Debug))
+
var `{dconf} float newGroundSpeed;
+
 
+
function PossessedBy(Controller C, bool bVehicleTransition)
+
{
+
Super.PossessedBy(C, bVehicleTransition);
+
 
+
GroundSpeed = newGroundSpeed;
+
}
+
`endif
+
 
+
</uscript>
+
====Useful Macros====
+
<uscript>
+
`define LogdFuncN() `logd(GetPackageName()$"."$class.name$"."$GetFuncName(),,'Debug');
+
</uscript>
+
 
+
<br>
+
 
+
 
[[User:00zX/Setting_Up_Your_UScript_Environment]]
 
[[User:00zX/Setting_Up_Your_UScript_Environment]]

Revision as of 11:03, 15 February 2011

Works in Progress

Unreal Development Kit

UDK: Project Silky - Status: Alpha

Unreal Tournament 3

UT3: GameDex Framework - Status: Beta
Newtators-v1.9e - Status: Point Release
Attrition-v0.5pb - Status: Public Beta

Highlighters

UnrealWiki - Code Noir Redex Theme

Monobook-noir-alpha3.gif

Status: Beta

To Install copy the contents of the following page into your own 'User:[name]/monobook.css' page.

User:00zX/monobook.css
W3C CSS Validator
High Resolution Image
Features
Dark Theme
High Contrast
Improved Readability
Highlighter adjustments for UScript, CSS and XML
Different coloured borders per GameNameSpace
Curved Borders in supporting browsers
Known Issues
Edit/Input boxes are still black text on white.
Profile settings page unreadable.





Wiki

Rants

User:00zX/Rants

Contact Me

IRC

00zX on EnterTheGame

Other/Profiles

E-mail 00zX or on



User:00zX/Using_The_Unreal_Engine_3_Preprocessor User:00zX/Setting_Up_Your_UScript_Environment