Help Creating an Explosive Grenade Launcher Weapon

I have been trying for a while now to make a gun that has an explosive projectile as its secondary fire mode. I can’t seem to figure out how to make the gun have splash damage that deals maximum damage with a direct hit on an enemy and deals radius damage upon impacting with the ground (the further the grenade is from the enemy, the less damage it deals, until the grenade is no longer within the damage radius and deals no damage). I have tried to study the default UDK Rocket Launcher, but I can’t seem to figure out how they did it. Any help would be appreciated.