PacktLib: Unreal Development Kit Game Programming with UnrealScript: Beginner's Guide

Unreal Development Kit Game Programming with UnrealScript

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Project Setup and Test Environments

System requirements

Time for action – Installing the UDK

Directory overview

Using external programs to code

Time for action – Installing ConTEXT

Time for action – Configuring ConTEXT

Time for action – Installing UnCo

Time for action – Configuring UnCodeX

Setting up a project

Time for action – Setting up AwesomeGame

Compiling and testing

Time for action – Compiling and testing AwesomeActor

Summary

Storing and Manipulating Data

Variables and arrays

Time for action – Using booleans

Time for action – Using integers

Time for action – Using floats

Time for action – Using strings

Time for action – Using enums

Time for action – Using arrays

Time for action – Using dynamic arrays

Time for action – Using structs

Time for action – Using vectors

Time for action – Using rotators

Variable properties

Time for action – Using the default properties block

Time for action – Editable variables

Time for action – Creating config variables

Common operators

Time for action – Math!

Time for action – Using modulo

Time for action – Comparisons

Time for action – Using logical operators

Time for action – Concatenation

Flow control

Time for action – Using if/else

Time for action – Using the for statement

Time for action – Something

Time for action – Using switches

Summary

Understanding the Class Tree

What is a class?

Time for action – All classes are created equally

Inheritance

Time for action – Examining inheritance

Time for action – Making a custom weapon

Time for action – Experiments with inheritance

Function overriding

Time for action – Creating a custom GameInfo and PlayerController

Time for action – Experiments with function overriding

Actors as variables

Time for action – Experiments with Actors as variables

Casting

Time for action – Casting Actor variables

Time for action – A practical example of casting for our game

Summary

Making Custom Classes

Creating a class

Time for action – Creating the weapon branch

Class modifiers

Time for action – Using abstract

Time for action – Hidecategories

Actors versus objects

Common UnrealScript classes

Time for action – Expanding AwesomeGame

Time for action – SHOOT NOW!

Time for action – Customizing the Pawn class

Time for action – Expanding the Controller

Time for action – No, my left!

Time for action – Detecting collisions to give our Pawn damage

Time for action – Making the TestEnemies move

Time for action – Using the HUD

Summary

Using Functions

What's your function?

Creating and calling functions

Time for action – Writing a function

Time for action – Calling custom functions

Time for action – What's your malfunction?

Local versus instance variables

Time for action – Using local variables

Time for action – Using Actors as local variables

Time for action – Modifying the projectile

Function parameters and modifiers

Time for action – Using function parameters

Time for action – Out parameters

Time for action – I'd like to return this please

Time for action – Filthy cheater

Time for action – Using static functions

The super

Using timers

Time for action – Just five more minutes mom

Putting it all together

Time for action – Expanding Awesome Game

Summary

Using States to Control Behavior

It's a state of mind

Time for action – Writing a state

Time for action – Switching states

Function overriding in states

Time for action – Multiple personalities

Time for action – Calling non-state functions

Time for action – Non-state functions from inside a state

State changes and detection

Time for action – BeginState

Time for action – EndState

Time for action – Using state detection functions

Subclassing states

Time for action – Subclassing the Seeking state

Keywords, labels, and latent functions

Time for action – Using ignores

Time for action – Do we really need to give labels to everything?

Like a boss

Time for action – Reverting our code

Time for action – Creating the abstract base class

Time for action – Creating and spawning the boss

Time for action – I like you, I kill you last

Time for action – Rage mode activate

Summary

Working with Kismet

Overview of Kismet

Time for action – Using Kismet

Time for action – A more complex Kismet sequence

Time for action – Bug fixing time!

Kismet actions

Time for action – Creating Kismet actions

Time for action – Using variables in Kismet

Time for action – Using handler functions

Time for action – Differentiating Kismet inputs

Kismet conditions

Time for action – What condition my condition was in

Kismet events

Time for action – The cleanup job

Time for action – Our first Kismet event

Time for action – Moving functionality into Kismet

Time for action – Setting the wave size

Time for action – Using SupportedEvents

Time for action – Creating a custom SupportedEvent

Latent actions

Time for action – Creating a latent action

Summary

Creating Multiplayer Games

The server-client relationship

Testing network code

Time for action – The server batch file

Time for action – The client batch file

Time for action – Unbreaking the player

Time for action – Unbreaking the game

Time for action – Making the GameReplicationInfo

Time for action – RUN AWAY!

Time for action – Bossing around

Replicating function calls

Time for action – Setting up for the client function

Time for action – Using the client function

Time for action – Using a server function

Time for action – Setting up the map

Time for action – Using simulated functions

Time for action – COMBO BREAKER!

Role and authority

Time for action – Examining Role and RemoteRole

Time for action – Respect my authority!

Time for action – Checking the level's NetMode.

Replicating variables

Time for action – Replicating a variable

Time for action – Using ReplicatedEvent

Summary

Debugging and Optimization

Compiler errors

Time for action – Preparing for brokenness

Time for action – A new script package

Time for action – Breaking the class itself

Time for action – Breaking some more code

Time for action – Misleading errors

Time for action – Captain obvious to the rescue!

Time for action – Setting up a twofer

Time for action – Mal-function

Time for action – Taking care of other function errors.

Time for action – Actor variable errors

Time for action – Other variable errors

Debugging

Time for action – Dealing with Accessed None

Time for action – Fixing an Accessed None

Time for action – Accessed None in function parameters

Time for action – Setting up a scenario

Time for action – Debugging using the log

Optimization

Time for action – Using the profiler

Time for action – Using Clock and UnClock

Summary

Odds and Ends

Using Components

Time for action – Adding a Component to an Actor

Time for action – Component compiler error

Time for action – Components as variables

Time for action – Creating a toggleable flashlight

DLLBind

Time for action – Using DLLBind

Final Thoughts

Summary

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Pop Quiz Answers

Index