Hi there. I have been working on a small mod that will primarily be used for a small group of friend. I don’t really have aspirations to make a very elaborate mod, but I would like to implement some things that seem to be beyond my knowledge at the moment.
Here is a small list of what I have in place now:
[ul]
[li]Medic: Self-healing gives 25% of the value of a health pack (I HATE self-healing rambo medics)
[/li][li]Panzer: Splash radius and damage reduced
[/li][li]Head Shots will now display a message to the target and the attacker (as well as play an indicator sound for each - I just have to find the right sound
)
[/li][li]Grenade carrying capacity was changed for a few classes
[/li][li]Light Weapons Soldier: Cluster Grenades
[/li][/ul]
It is with this last point that I am having an issue with. As it is now, I have alterred the fire_grenade() function to check to see whether or not the player is a soldier, and whether or not his primary weapon is a THOMPSON or MP40. If so, I set bolt->classname = “cgrenade”… which I then look for in MissileImpact and ExplodeMissile (I think those are the names of the functions… I’m not at my dev workstation right now) What I would like to do is also check to see if the soldier has enough “Energy” to throw it, and if he does, throw the grenade and consume 100% of his energy.
I’ve looked at other functions that consume energy and can’t quite wrap my head around it. If someone could shed a light on how this is done, I would appreciate it greatly. If anyone is interested in play-testing this little mod, please contact me @ mierk@ratjam.com
Thanks!
-Mierk