UnrealScript Game Programming Cookbook

(Chris Devlin) #1

4


Crafting Pickups


In this chapter, we will be covering the following recipes:


f Creating our first pickup
f Creating a base for our pickup to spawn from
f Animating our pickup
f Altering what our pickup does
f Allowing vehicles to use a pickup

Introduction


Artificial intelligence can cover a variety of things in UDK, so we won't delve too far down
that path, at least not in this chapter. Here, we'll briefly cover it, and how the AI interacts with
pickups throughout the game, specifically what attracts them to certain pickups. Furthermore,
we'll dive into creating our own pickups and how they interact with our pawn's inventory.


So with that, let's talk about AI.


Understanding AI


The main class that handles player actions in UDK is the PlayerController class.
Similarly, actions are controlled by the AIController class. Considering that they both
inherit Controller, they share quite a bit of functionality. For the most part, AI controllers
don't necessarily need a pawn, just like a player controller.

Free download pdf