Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

Difference between revisions of "UE3:Create a ScriptedTexture"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(created basic procedure)
 
m (limited class links to UE3 namespace)
 
Line 1: Line 1:
 
{{basic-script}}
 
{{basic-script}}
A {{classgames|ScriptedTexture}} is created with the following syntax:
+
A {{classgames|ScriptedTexture|e=UE3}} is created with the following syntax:
 
<uscript>
 
<uscript>
 
local ScriptedTexture ST;
 
local ScriptedTexture ST;
Line 7: Line 7:
 
ST.Render = RenderFunction;
 
ST.Render = RenderFunction;
 
</uscript>
 
</uscript>
This creates a new ScriptedTexture that is ''SizeX'' pixels wide and ''SizeY'' high that is cleared to ''ClearColor'' before redrawing. ''RenderFunction'' must be a function without return value that has only one parameter of type {{classgames|Canvas}}.
+
This creates a new ScriptedTexture that is ''SizeX'' pixels wide and ''SizeY'' high that is cleared to ''ClearColor'' before redrawing. ''RenderFunction'' must be a function without return value that has only one parameter of type {{classgames|Canvas|e=UE3}}.
  
 
Usually you will want the ScriptedTexture to be [[Set the Material parameter|specified as Material parameter]].
 
Usually you will want the ScriptedTexture to be [[Set the Material parameter|specified as Material parameter]].

Latest revision as of 10:57, 17 March 2010

A ScriptedTexture(UDK, UT3) is created with the following syntax:

local ScriptedTexture ST;
 
ST = ScriptedTexture(class'ScriptedTexture'.static.Create(SizeX, SizeY,, ClearColor));
ST.Render = RenderFunction;

This creates a new ScriptedTexture that is SizeX pixels wide and SizeY high that is cleared to ClearColor before redrawing. RenderFunction must be a function without return value that has only one parameter of type Canvas(UDK, UT3).

Usually you will want the ScriptedTexture to be specified as Material parameter.