AddDefaultInventory() function, 215, 284, 291
AddGunToSocket() function, 215
AddHealthBonus() function, 291, 295
AllBlocksDestroyed() function, 271
Angry Birds, 261
Apple developer's license, 23
Artificial Intelligence path finding. See Path finding
AttackEnemyTimer() function, 300
Ball and Socket constraint, 112
BotAttackCoverController states, 284
Bots
descripton, 137
UDK (see UDK bots)
Breakable angular constraints, 112
Class declarations, 41
Code execution flow control statements
For Statement, 40
If Statement, 39
While Statement, 39
Collisions models
Convex Mesh Primitive, 85
cube static mesh, 84
description, 83
K-DOP, 85
sphere collision mesh, 85
Collisions objects
description, 86
KActor and KAsset
AddImpulse() function, 87
ApplyImpulse() function, 87
BoneName, 88
PrimitiveComponent class, 88
rigid body collisions, 86
RigidBodyCubeMesh, 86
StaticMeshComponent, 86
Combat game.See First-persons hooter game framework
Convex Mesh Primitive, 85
Cover nodes
BotCoverController class, 242
CoverLink class, 239
CoverLinkEx cover node, 250–252
Cover ProtectionAngle variable, 251
custom cover node system, 239
description, 238
FindClosestEmptyCoverNodeWithinRange loops, 245
FindEnemy Location() function, 246
game configuration, 252
game type creation, 240
IsCoverSlotAvailable() function, 245
IsCoverSlotValid()function, 245, 251
IsCurrentCoverValid() function, 246
PrepMoveToCover() function, 247
SpawnBot() function, 242
UDK cover link, 238
UnclaimAllSlots function, 244
CreateNewGameBall()function, 268
Directionvector
calculation, 260
construction, 259
description, 258
kickinganobject, 259
DrawHUD() function, 274
DrawHUDItem() function, 274
Enemy bot's code
BotControllerAttack class, 217–220
weapon projectile, 220
EWFT_Custom weapon, 63
EWFT_InstantHit weapon, 63
EWFT_Projectile weapon, 63
ExecuteResetAfterSpawn() function, 305
ExecuteWhatToDoNext() function, 217
FindSpawnPad() function, 288
First-person shooter game framework
AddDefaultInventory function, 284
bot controller creation
AI-related code, 305
attacking the player, 303
class variables and cover node functions, 297
default properties, 308
ExecuteWhatToDoNext, 306
GeneratePathTo, 300
Getting Health Pickup, 302
resetting the bot, 305
TakeCover State, 300
bot projectile creation, 309
bot spawn pad creation, 309
bot weapon creation, 308
BotAttackCoverControllerstates, 284
computer-controlled bot, 284
game type configuration, 313
GetRandomSpawnPosition() funtion, 285
Health Bonus power-up class, 312–313
PlaceWeapon function, 284
player controller class creation
FindSpawnPad() function, 288
player input, 289
Player Tick function, 290
ResetGame() function, 287
SpawnBot() function, 288
SpawnBotOnRandomPad() function, 288
spawning bots, 288
SwipeZoneCallbackfunction, 289
Weaponplacement, 290
player's pawn creation, 291–292
player's projectile creation, 293–295
player's weapon creation, 292–293
For Statement, 40
Game frameworks.See First-person
shooter game framework;
Physics game framework;
Third-person adventure game
framework
creating basic game framework
configuring game type, 221
HUD display, 221
setting up spawn pad, 222
difficulty
enemies, 206
game play rules, 206
level design, 206
player, 206
power ups, 206
game balance, 206
GameTimer() function, 266
Gaming environment
description, 175
Kismet
description, 185
locked gates creation, 193–199
moving platform creation, 185–193
usage, 185
UDK HUD
description, 199
DrawHUD() function, 200
textures display, 201
UDK Sound Cues
description, 175
using Unreal Script, 181
GeneratePathTo() function, 217
GetRandomSpawnPosition() function, 285, 295
Hard angular constraints, 111
Heads Up Display (HUD)
creation
custom function, 310
DrawHUD function, 310
PostBeginPlay function, 310
description, 199
DrawHUD() function, 200
DrawHUDItem() function, 204
textures display, 201
Health Bonus power-up class
Tick() function, 312
Touch() function, 312
Health Pickup Available() function, 301
Hinge constraint, 112
If Statement, 39
InitKickBallGame() function, 271
InputDelayTimer() function, 265
KActor
creation
ApplyForceRigidBody() function, 95, 97
ApplyImpulse() function, 95
custom player controller, 94–99
IsA() function, 95
new game type configuration, 99
OnEngineHasLoaded() function, 94
PickActor() function, 95
PickDistance, 99
properties, 90
SetupZones() function, 98
sphere transformation widget, 91
SwipeZone() callback function, 96
description, 86
creation
ApplyForceRigidBody function, 107
bounding box, 103
custom game type, 106
custom player controller, 107–109
new game type, 109
properties, 105
description, 86
K-DOP, 85
Kismet
limitation, 29
locked gates creation
gate with trigger, 194
opening the gate, 198
sound effects creation, 199
trigger controlling Matinee sequence, 195
moving platform creation
Gate Mesh platform, 186
Initializing, 192
Kismet nodes, 187
Matinee node, 187
working platform, 193
Unreal Kismet Editor, 31
usage, 185
See also GamePlay
Linear constraints, 111
LoadLevel() function, 269
Navigation mesh
advantages, 141
bot creation
description, 154
game type configuration, 160
parts, 156
description, 141
usage, 141
NeedHealthPickup() function, 301
Operators,UnrealScript
artithmetic, 38
description, 38
Path finding
bot equipping, weapon and taking damage
pawn modification, 166–168, 171–172
player controller modification, 170–171
player's weapon modification, 172
running the game, 173
weapon and projectile creation, 168–170
bot movement
botmarker creation, 161
description, 161
running the game, 165
description, 140
navigation mesh
advantages, 141
description, 141
usage, 141
path nodes
description, 140
Path nodes
bot creation
bot controller and pawn, 150–153
collision cylinder, 151
description, 142
FindPath Toward() function, 152
game type, 144
game type configuration, 153–154
MoveTo() function, 152
player controller and pawn, 145–148
running the game type, 154
weapon inventory manager, 148–150
description, 140
Pawn class
BackVector variable, 61
CamDistanceHorizontal variable, 61
CamOffsetDistance variable, 61
Jazz1Pawn modification, 60
out_CamRot.pitch variable, 61
third-person view, 62
See also Player controller
Physics constraints
creation, Unreal Editor
ball and socket joint, 113
new objects insertion, 113
properties, 116
SwipeZoneCallback() function, 119
description, 110
dynamic, 112
linear constraints, 111
predefined constraints, 112
Physics game framework
angle of launching collision object, 262–263
Angry Birds, 261
creating collision object, 262
sample game
game type configuration, 277
player controller class creation, 265–272
RigidBodyCubeEx object creation, 276
PickActor() function, 267
PlaceWeapon() function, 284
Player controller
3D skeletal mesh character
default first-person view, 55
JazzMesh, 58
player's default view, 59
Skeletal Mesh Component, 58
CalcCamera() function, 59
description, 53
PlayerController class, 53
PlayerMove() function, 54
PlayerTick() function, 54
ProcessMove() function, 54, 59
SimplePC class, 53
UpdateRotation() function, 54, 59
Player input controls
motion input, 22
touch input, 20
SetupZone function, 21
SwipeZoneCallback, 21
virtual joysticks, 18
location, 18
type, 19
UberGroup, 18
Player weapon's bullet, 294
weapon, 214
weapon projectile, 215
PlayerTick function, 290
PostBeginPlay() function, 266, 274
Predefined constraints, 112
PrepAttackingEnemy() function, 303
PrepGettingHealthPickup() function, 301
Prismatic constraint, 112
ProcessLookUpInput() function, 265
Provisioning, UDK game, 23
Pulley constraint, 112
ResetAfterSpawn() function, 304
ResetGame() function, 269, 287
RigidBodyCollision() function, 272, 276
RigidBodyCube() function, 276
Role-playing game (RPG) framework. See Top-down shooter, RPG game framework
SetupZones() function, 269
Skeletal mesh, 10
AnimSet Editor, 12
Setting Materials, 12
SK_Jazz, 12
Soft angular constraints, 111–112
Sound Cues Editor
attenuation
A_Powerup_UDamage_SpawnCue, 176
distance algorithm, 177
description, 175
looping
description, 177
properties, 178
Vehicle_Damage_FireLoop_Cue, 177
modulator node
A_Effort_EnigmaMean_Death_Cue, 179
description, 179
property, 180
random node
description, 178
properties, 179
S_BulletImpact_01_Cue, 178
SpawnBot() function, 288
SpawnBotOnRandomPad() function, 288
State diagram for enemy bot, 305, 306
SwipeZoneCallback() function, 269, 289
TakeDamage() function, 215, 217, 291
Third-person adventure game framework
advantages, 319
bot ally controller
AI support code, 335
ExecuteWhatToDoNext() function, 330, 335–336
Following Target state, 331–332
GeneratePathTo() function, 331
SetCommand() function, 330
BotAllyController class, 321
BotControllerGuard class, 321
BotMarker creation, 336
computer-controlled bot, 320
DrawHUD() function, 343
DrawHUDItem() function, 343
enemy guard bot controller
AI support functions, 341
ExecuteWhatToDoNext() function, 341–342
FindUnguardedGenerator() function, 338
GeneratePathTo() function, 337
GuardedStructure, 337
guarding related functions, 338–339
Guarding state, 337
IsInPatrolRange() function, 338
mesh navigation, 337
threat, 337
enemy guard bot pawn creation, 342
features, 320
game type configuration, 346
Generator class, 321
HUD class, 320
HUDInfo structure, 343
level creation, 347
Pawn class, 321
player controller
AllyBot and AllyPawn variables, 323
bBotCommandStateActive variable, 323, 327
bGameOver, 323
bot command related functions, 325
BotAllyController class, 326
CreateNewGuardBot() function, 322, 325
enemy guard bot creation, 326
ExecuteBotAttackCommand() function, 324
ExecuteBotMoveCommand() function, 324
FindObjectiveHealth() function, 322, 324
FindSpawnPad() function, 325
GuardBot and GuardPawn variables, 323
IsActorAllyBot() function, 327
IsActorGuardBot() function, 327
ObjectiveHealth, 323
PickActor() function, 324
PlayerTick() function, 322, 329
ProcessTouch() function, 323, 327, 328
SelectBotAllyGraphic() function, 325
SetBotMarkerGraphic() function, 324
SpawnAllyBot() function, 322, 326
SpawnGuardBot() function, 325
SwipeZoneCallback, 328
SwipeZoneCallback() function, 328
PlayerControllerClass variable, 322
power generator creation, 345–346
StaticMesh variable, 336
TakeDamage() class, 345
Tick() function, 336
3D math
CalcCamera function, 257
cover nodes
BotCoverController class, 242
CoverLink class, 239
CoverLinkEx cover node, 250–252
CoverProtectionAngle variable, 251
custom cover node system, 239
description, 238
FindClosestEmptyCoverNodeWithinRange loops, 245
FindEnemyLocation() function, 246
game configuration, 252
game type creation, 240
IsCoverSlotAvailable() function, 245
IsCoverSlotValid() function, 245, 251
IsCurrentCoverValid() function, 246
PrepMoveToCover() function, 247
SpawnBot() function, 242
UDK cover link, 238
UnclaimAllSlots function, 244
description, 227
direction vector
calculation, 260
construction, 259
description, 258
kicking an object, 259
scalars, 227
third-person camera positioning, 257–258
vectors
2D plane, 228
3D Unreal world coordinate system, 229
description, 227
normalized, 231
properties, 228
right triangle, 235
rotator to vector conversion, 230–231
scalar multiplication, 232–233
SetRotation() function, 230
unit circle, 234
Tick() function, 312
Top-down shooter,RPG game framework
Ally bot pawn, 361
CalcCamera() function, 352, 359
character information class, 362
characteristics, 353
DrawAllyHUD() function, 365
DrawPlayerHUD() function, 365
features, 352
game type configuration, 367
game type creation, 354
GetBaseAimRotation() function, 359
player controller
CharacterFile variable, 356
functions, 355
HUDPawn variable, 356
LoadCharacterInfo() function, 355, 356
LoadSquadInfo() function, 355, 356
PlayerMove() function, 355, 356
PostBeginPlay() function, 356
SaveCharacterInfo() function, 355, 356
SaveSquadInfo() function, 355, 356
SpawnGuardBot() function, 357–358
SwipeZoneCallback() function, 358
SaveSquadInfo() function, 353
Scale3D variable, 363
TakeDamage() function, 361, 362
Touch() function, 272, 312, 363
Unreal Development Kit (UDK)
Apple developer's license, 23
Asset Search, 6
blockwall, 8
configuring custom game types, 27–28
Content Browser, 5
checkbox, 4
content browser and UDK Assets, 5
generic browser, 2
system, 6
texture assets, 8
iOS platform
input controls (see Player input controls)
saving data, 16
textures an iOS device, 17
iOS requirements, 22
Materials Editor, 9
provisioning, 23
running UDK game on iOS device, 23–27
Startup Screen, 2
Texture Properties, 8
Unreal Cascade, 14
website, 1
Unreal Development Kit (UDK) bots
AddDefaultInventory() function, 166
AddGunToSocket() function, 166
AIController class, 138
classes, 138
controller class, 139
CylinderComponent class, 151
description, 137
ExecuteBotMoveCommand() function, 162
JazzPawnDamage, 145
JazzWeaponDamage, 148
key functions
ExecuteWhatToDoNext() function, 139
LatentWhatToDoNext() function, 138
WhatToDoNext() function, 139
path finding
bot equipping, weapon and taking damage, 166–173
description, 140
PickActor() function, 162
Possess() function, 139
PossessedBy() function, 139
Spawn() function, 140
SwipeZoneCallback() function, 171
TakeDamage() function, 166
UDKBot class, 138
UnPossess() function, 140
Unreal Development Kit (UDK) collisions
bBlockActors variable, 123
bCollideActors variable, 123
BlockActors variable, 122
BlockRigidBody variable, 122
bNotifyRigidBodyCollision variable, 122
bWakeOnLevelStart variable, 122
CollideActors variable, 122
exploding wall of blocks
kicking objects, 135
MinimumForceToExplode variable, 132
OutOfViewLocation variable, 132
particle system, 133
RigidBodyCollision() function, 133
SpawnEmitter() function, 132
meshes
Convex Mesh Primitive, 85
cube static mesh, 84
description, 83
K-DOP, 85
sphere collision mesh, 85
objects
custom player controller, 124–127
description, 86
game type setup, 128
RigidBodyCollision() function, 123
physics constraints
creation, Unreal Editor, 113–120
description, 110
dynamic, 112
linear constraints, 111
predefined constraints, 112
Physics variable, 122
RBChannel variable, 122
RigidBodyCollision() function, 121
RigidBodyCubeMesh, 122
Unreal Physics system, 83
Unreal Development Kit (UDK) SoundCues
description, 175
Editor
description, 175
PlaySound() function, 181
using UnrealScript, 181
weapon
creation, 183
description, 182
Unreal Development Kit (UDK) weapons
Activate() function, 66
active state, 66
BeginFire() function, 66
BeginState() function, 66
ChangedWeapon() function, 66
custom inventory manager creation
AddDefaultInventory() function, 73
AddGunToSocket() function, 73
GetBaseAimRotation() function, 73
WeaponsIM1 class, 71
description, 63
EndState() function, 66
EWFT_Custom, 63
EWFT_InstantHit, 63
EWFT_Projectile, 63
Explode() function, 71
FireAmmunition() function, 64, 67
first-person view
new game type, 80
pawn creation, 77
PlaceWeapon() function, 78
player controller creation, 78–79
PlayerTick() function, 78
projectile creation, 77
weapon creation, 76
i
nactive state, 66
Init() function, 71
inventory manager, 63
MaxSpeed variable, 71
pawn
final custom weapon, 70
FiringStatesArray, 69
mesh variable, 69
WeaponFireTypes array, 69
player controller
flames, 75
SwipeZoneCallback() function, 74
weapon demonstration, 75
Scale3D variable, 71
selection, 66
SendToFiringState() function, 67
SetPendingFire() function, 67
StartFire() function, 67
SwipezoneCallback() function, 67
Template variable, 71
WeaponEquipping state, 66
WeaponFiring state, 66
WeaponPuttingDown state, 66
UnrealScript programming language
automatic garbage collection, 33
BeginState functions, 42
Broadcast() function, 43
class declarations, 41
code execution flow control statements
For Statement, 40
If Statement, 39
While Statement, 39
comments, 34
creating and compiling
actual compiling 1, 44
compile scripts, 45
notepad, 43
debug messages, 43
description, 29
EndState functions, 42
finite state machine(FSM), 42
functions, 41
Kismet
description, 29
limitation, 29
Unreal Kismet Editor, 31
Latent functions, 33
None references, 33
object with touch selection
game type configuration, 49–50
OnEngineHasLoaded() function, 46
PickActor() function, 47
player controller creation, 47–49
PreventDeath() function, 46
SetGameType() function, 47
SetupZones() function, 49
SwipeZoneCallback() function, 48
objects execute script independently, 33
operators
artithmetic, 38
description, 38
single inheritance, 33
variables
description, 34
scope modifiers, 35
UpdateRotation() function, 265
Variables, UnrealScript
description, 34
scope modifiers, 35
types
bool, 35
dynamic arrays, 36
enum, 35
float, 35
int, 35
object reference, 37
static arrays, 36
string, 35
struct, 36
Vectors
2D plane, 228
3D Unreal world coordinate system, 229
description, 227
normalized, 231
properties, 228
right triangle, 235
rotator to vector conversion, 230–231
scalar multiplication, 232–233
SetRotation() function, 230
unit circle, 234
While Statement, 39
3.142.35.54