This will tell the editor to open new script package called "LivingDead.u" each time it starts. We'll create this package below.
4. Scroll up to the beginning of the file and look for "SourceDir=..." line in section [URL]. At the right part of this line (after "=") you'll see a folder where Undying will search for any new scripts you can make. So, you should create a folder on your hard-drive, which WILL NOT CONTAIN SPACES in its name. I can recommend you to use "C:\UndyingScripts".
Now you should modify "SourceDir=..." line to "SourceDir=C:\UndyingScripts".
5. Save the file and close Notepad.
6. Go to "C:\UndyingScripts" folder. Now here you should create a subfolder for your new package, let's call it "LivingDead". Go inside this folder after you create it and create two subfolders there: one called "Textures" and other called "Classes".
7. Go inside "Classes" folder, and create a new file there named "ZombieMaid.uc", ".uc" extension is required. Open this file with Notepad.
8. Paste the following in Notepad:
//============================================================================= // ZombieMaid. //============================================================================= class ZombieMaid expands Maid;
// This function is called right before game begins, so this is a right place to // set new skin. function PreBeginPlay() { local Texture t; // local variable in which we'll load new textures
Super.PreBeginPlay(); // don't forget to call this function from PreBeginPlay()
// load new texture, full path to texture is "Aeons.Meshes.ServtBEaten01", // and this one is a texture of eaten servant. t = Texture( DynamicLoadObject( "Aeons.Meshes.ServtBEaten01", class'Texture' ) );
// assing this texture to our Pawn (ZombieMaid). We should replace two textures, // as Maid's mesh uses two different textures for skinning. So this is the first one: SetTexture( 1, t );
// now load next texture and assign it t = Texture( DynamicLoadObject( "Aeons.Meshes.ServtBEaten02", class'Texture' ) ); SetTexture( 2, t ); }
And do not wrap lines!
9. Save the file and close Notepad.
10. Call "Run..." from your Windows Start Menu, and browse for "Undying\System\ucc.exe" file. Click "Open" and add word "make" to the command line so it looks like "...Undying\System\ucc.exe make", space before "make" is required. Now run it. It should find new scripts and create a package "LivingDead.u" in your "Undying\System" folder.
11. Open UndEd or UndEd2 and create a simple map, then open Actor Browser and select Visible->Pawn->ScriptedPawn->ScriptedBiped->ScriptedNarrator->Servant->Maid->ZombieMaid actor.
12. Insert this actor in your map, build map and save it.
13. Run the map and you should see zombie maid staring at you!
If you'll encounter any troubles, please carefully check if you missed to do something.
PART II - creating Zombie Trsanti pawn
14. As you did in Part I, go to "C:\UndyingScripts\LivingDead\Classes" folder.
15. Create a new file called "TrsantiZombie.uc" and open it with Notepad.
16. Fill it with the following:
//============================================================================= // TrsantiZombie. //============================================================================= class TrsantiZombie expands Trsanti;
This is a script for TrsantiZombie pawn. It has some new stuff we should discuss:
"#exec Texture Import" statement
This statement allows us to import different textures right inside our LivingDead.u package, so we shouldn't distribute a separate .utx file for our scripts. Texture files for import should be stored in "C:\UndyingClasses\LivingDead\Textures" folder, as Undying will search for them in that folder. You should set a name of texture file in "File=" and point a group in "Group=". Group is not required, but it's better to use it. Set "Group=Skins" for skins, and it'll be just fine.
In the attached archive you'll find two texture files: MaleZombie01.pcx and MaleZombie02.pcx. Place them inside your "C:\UndyingClasses\LivingDead\Textures" folder.
t = texture( DynamicLoadObject( "LivingDead.Skins.MaleZombie01", class'Texture' ) );
As you can see here, full path to newly imported texture is combined of three parts:
PackageName.GroupName.TextureName
Our PackageName is LivingDead, GroupName is Skins (as you set in "#exec Texture Import") and TextureName is "MaleZombie01" and "MaleZombie02" as you set in "File=..." property of "#exec...", without .pcx extension.
defaultproperties section
Well, I've played around with this ZombieTrsanti and he won't have a revolver anymore, and will only be able to walk slowly and hit you with his sword. Also he will become less intellectual. You shouldn't bother about this section now, I've included it just for fun, along with PlayRun() function.
17. Well, now save the file and close Notepad.
18. Call "Run..." from your Windows Start Menu, and browse for "Undying\System\ucc.exe" file. Click "Open" and add word "make" to the command line so it looks like "...Undying\System\ucc.exe make", space before "make" is required. Now run it. It should find new scripts and update your "LivingDead.u" package.
19. Open the Editor and as in Part I add Visible->Pawn->ScriptedPawn->ScriptedBiped->Trsanti->TrsantiZombie actor in your map. Build, save and run and you should be attacked by a dead Trsanti!
Hope you'll make it and have no troubles, good luck!
You can download all the scripts, textures and package itself here.