Dark Cloak Posted October 9, 2002 Share Posted October 9, 2002 Okay, I'm trying to figure something out here...causing somebody to disintegrate as if they had been hit with the disruptor rifle when they are hit with a lightsaber...how would that work? I'm assuming that it would be in the code somewhere...but I'm not sure where to find it. I took a break from JK2 for a while to learn coding, so I'm a bit back up to par...a bit. I KNOW that SOMEWHERE out there, there's some kind of instagib mod that does it every so often...but I'm trying to figure out a way to make it happen every time someone gets hit with the saber. I'm also ASSUMING you can't make it happen in Single Player...ASSUMING...I'm hoping I'm wrong. Link to comment Share on other sites More sharing options...
Kyle098 Posted October 9, 2002 Share Posted October 9, 2002 well in multiplayer it is possible,but not in single.first you have to make all the saber damages to 100 or actually more liek 200 so it is an instant kill. then in the code,the code of disintergate is: if (traceEnt->client && preHealth > 0 && traceEnt->health <= 0 && fullCharge) { //was killed by a fully charged sniper shot, so disintegrate VectorCopy(preAng, traceEnt->client->ps.viewangles); traceEnt->client->ps.eFlags |= EF_DISINTEGRATION; VectorCopy(tr.endpos, traceEnt->client->ps.lastHitLoc); traceEnt->client->ps.legsAnim = preLegs; traceEnt->client->ps.torsoAnim = preTorso; traceEnt->r.contents = 0; VectorClear(traceEnt->client->ps.velocity); } if you are looking at the jedimod source this code is on line 716 in g_weapons.c Link to comment Share on other sites More sharing options...
Covax Posted October 9, 2002 Share Posted October 9, 2002 I'm trying to get the same thing for the Blade mod. ASK wrote this last week, not that I understand a bit of it: [edit] Meh... to lazy to HTML the whole thing, here's the thread: http://www.lucasforums.com/showthread.php?s=&threadid=80485 Link to comment Share on other sites More sharing options...
ASk Posted October 9, 2002 Share Posted October 9, 2002 It's the code for the Disruptor shot initiating disintegration and then the game handling it Basically to disintegrate an entity, do this: ent->client->ps.eFlags |= EF_DISINTEGRATION; and the game will do the rest Link to comment Share on other sites More sharing options...
Dark Cloak Posted October 10, 2002 Author Share Posted October 10, 2002 So, all I really have to do is find the right point within in the function dealing out the damage that the saber does...and insert ent->client->ps.eFlags |= EF_DISINTEGRATION; ? Or so it would seem to me... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.