View Full Version : How do I edit Force Drain?

09-23-2004, 02:38 PM
I've never ventured into JA coding beyond doodling with NPC files, but I would really like to change Force Drain in MP.

I have fond memories of draining Stormtroopers in SP, but in MP Drain is absolutly useless, draining only Force manna. I want to make it drain health, but I don't have the faintest clue where to start. Can someone help me?

09-23-2004, 04:57 PM
hmm, try taking a look insde w_force.c at these 2 functions. forcedrain and forceshootdrain, those might help, and try look at the forcelightning and forceshootlightning code too, to see how force powers take away health.

09-24-2004, 10:19 AM
In all of that, I couldn't find anyplace where it specified what it was damaging. :(

I supose it would help if I had some knowledge of C++, because the more I search the more confused I get.

09-24-2004, 08:43 PM
thats what u need to change.. heres a example of my heal drain

//GangsterAngel +++++++++++++++
if(traceEnt->client->pers.indured==1) {

if(self->client->pers.FP_Drain==1) {// Heal drain
if(traceEnt->health <=101) traceEnt->health+=dmg;

if(traceEnt->client->pers.maxspeed <=250) // Fix legs
if(traceEnt->client->pers.maxspeed>= 250)traceEnt->client->pers.maxspeed=250;