UnrealScript Game Programming Cookbook

(Chris Devlin) #1

Crafting Pickups


104


  1. With our newly created archetype ready, we can now drag-and-drop it into the editor's
    window and see the reward for our hard work.


We're done! Our pickup will now offer health instead of ammo. If you were to create another
health pickup which offers more health, some subtle changes can go a long way.


I'd suggest placing a new static mesh for the pickup, and consider increasing the scale of
the mesh, along with increasing the health value. Furthermore, bots generally desire health
pickups more than ammo, so if you do create a pickup which offers more health, be sure to
increase the bot desirability as well.


How it works...


By extending from a different class, UTHealthPickupFactory, we are able to easily
change the purpose of our pickup. Rather than have one which drops ammo, we can now
have a pickup which spawns health. We can just as easily create a pickup which spawns
armor as well.


Again, we've created an archetype, so that our pickup class can be referenced and used
in the UDK editor and placed in our level.

Free download pdf