UnrealScript Game Programming Cookbook

(Chris Devlin) #1
Chapter 2

41

We'll be creating an archetype in UnrealScript to allow the level designers to use it in the
editor. To have a better understanding of how archetypes work within the editor in UDK
visit http://udn.epicgames.com/Three/UsingArchetypes.html.


To streamline the prototyping process and eliminate clutter from archetypes, we'll also be
hiding certain properties from the level designer. Alternatively, we can expose new variables
as well and organize them within categories. This allows us to remove properties that
generally wouldn't be beneficial or of any use to a level designer. If your designer ever
wanted more control over an archetype, it is as simple as changing one line of code.


Getting ready


We'll begin by loading the map that contains our example archetype. Much like our prefab,
this will allow you to see the various components used to create one, as well as teach you
to create one of your own.


To get things started, let's open up a new DefaultMap under the Tutorials folder.
Alternatively, if you want to see the end result of this chapter, load the map in the Chapter 2
folder called Ch2_Archetypes.


How to do it...


We're going to start by creating an archetype from a PointLight, which is already provided
by UDK. Since the development kit offers a plethora of excellent and professional assets
available to us, we'll use these for most of our recipes.



  1. Open the Actor Classes tab, and left-click on Lights to open the pull-down list.

Free download pdf