Cogito, ergo sum

Difference between revisions of "Create a class"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Created page with '{{basic-script}} Firstly, you will need to understand how classes in unreal script are defined. As stated on this page the extends clause is mandatory for all classes ex…')
 
m
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
Firstly, you will need to understand how [[classes]] in unreal script are defined. As stated on this page the [[extends clause]] is mandatory for all classes except for object.
 
Firstly, you will need to understand how [[classes]] in unreal script are defined. As stated on this page the [[extends clause]] is mandatory for all classes except for object.
  
For the purpose of this example we will assume '''yourclass''' extends [[UE3:Mutator]].
+
For the purpose of this example we will assume '''YourClass''' extends [[UE3:Mutator_(UT3)]].
  
 
<uscript>
 
<uscript>
Line 13: Line 13:
 
}
 
}
 
</uscript>
 
</uscript>
 +
 +
Your file should look like the above with the exception of '''YourClass''', save the file as {'''Your Package'''}\Classes\YourClass.uc

Latest revision as of 11:30, 5 May 2010

Firstly, you will need to understand how classes in unreal script are defined. As stated on this page the extends clause is mandatory for all classes except for object.

For the purpose of this example we will assume YourClass extends UE3:Mutator_(UT3).

class YourClass extends Mutator;
 
function InitMutator(string Options, out string ErrorMessage)
{
	`log("I am your mutator!",,'mutator');
}

Your file should look like the above with the exception of YourClass, save the file as {Your Package}\Classes\YourClass.uc