Game Development Reference
How to do it...
This is a bit more complicated than our previous recipes. We'll have to create a new pickup
class in our IDE, as well as an archetype in the editor, so that we're able to access the class
and its variables within the editor. This is essential when working with level designers who
are not familiar with code.
Firstly, we want to have a sleek interface when we play with our pickup in the editor,
so add the following code, beneath your class declaration:
class Tut_HealthPickup extends UTHealthPickupFactory
/** Hides categories that we won't be needing from the
HideCategories(Object, Debug, Advanced, Mobile, Physics);
The rest of the code will be going in the defaultproperties block:
/** The value at which an AI bot desires the pickup.
Higher value = will lean towards this pickup */
/** How much this pickup will heal the pawn for */
/** sound played when the pickup becomes available */
/** Time (seconds) before health pickup respawns */
/** Pickup will rotate */
/** Speed of the rotation */
/** if true, the pickup mesh floats (bobs) slightly */
/** How fast should it bob */
/** How far to bob. It will go from +/- this number */
This is the same code from the previous recipe, albeit some of the values have
changed and we've now added a new variable, HealingAmount . This does
exactly what you think it does.