Gah - a solution with more questions. – EntropicLqd

Comments

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 06:00, 5 May 2008 by Azrael (Talk | contribs) (Added some basic content.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Comments are a way of inserting text into UnrealScript code to remind yourself of what the code is doing, or to give a summary of the code file. Comments will be ignored by the compiler, so they can also be used to temporarily 'disable' a line of text.

Anything on a line after the special comment symbol // is a comment. For example, many official Unreal Tournament files have headers such as this:

//=============================================================================
// A sticky note.  Level designers can place these in the level and then
// view them as a batch in the error/warnings window.
//=============================================================================
class Note extends Actor
	placeable
	native;
 
#exec Texture Import File=Textures\Note.pcx  Name=S_Note Mips=Off MASKED=1
 
var() string Text;

To disable a line of text, simple insert the // before it, like this:

simulated function ShaderAction( Shader sh )
{
	//log("ShaderAction " $ sh );
 
	switch( MatTriggerAction )
	{
		case MTA_SwapShaderSpecular:
			sh.Specular = SwapMaterialA;
			break;
	}
 
}