Game Development Reference
In-Depth Information
How to do it...
In the defaultproperties block at the bottom of your class, add the
following code:
// How many rounds will be added to our weapon type
// The type of weapon that this pickup will supply ammo
This simply declares the amount of ammo that will be added to the pawn's
inventory, as well as for which weapon class when it is picked up.
Moving on, add the following code for the sound the pickup will make when
it is acquired, respawn time, and the desirability for a bot to pick it up:
// The sound effect triggered when the pickup is acquired
/** The value at which an AI bot desires the pickup. Higher
value = will lean towards this pickup */
// Time (seconds) before the pickup respawns
Desirability is a bot's attraction to a particular object in UDK. It can be
anything from ammo or health, to a specific weapon. Bots can also be
programmed to have a preferred weapon, and seek ammunition for that
above all else. The higher the desirability, the more likely a pawn is to
ignore other objects (and often pawns) to go after it.
This is especially effective when changing an AI's routine during a
particular gameplay type. In capture, if the flag matches, you can often
tell your AI companions to either defend your flag, attack the enemy flag,
or roam about and seek enemies.
We really could use any sound here, so for the sake of variety let's use the rocket
launcher's pickup sound.
Search Nedrilad ::

Custom Search