Shao_X Posted March 14, 2005 Share Posted March 14, 2005 Greetings, A few friends and I have an idea for a small modification, though none of us know how to edit and mod. We'll need help. The idea was to replace death caused by saberdamage or gundamage by unconsiousness. For you the screen goes black, and you'll see a countdown. The other people will see you lying there. When the countdown's finished, the screen will return to normal, and you will get up, with low HP and ForceP of course. So basically, when someone dies, they'll go into a lying down animation (or even the default death animations), but they won't be -dead- and have to respawn. They'll just be immobile for an X amount of time while the screen is black and they see a count down timer. Also, how could I implement a variable that allows us to change the amount of seconds someone would be K.O.'d for? We hope this mod will bring more feeling of RolePlay, where people spar for practice. No one's supposed to die during training after all. If there's anyone that can help us on the way, if only tell us what we must learn, we will be forever thankful. Link to comment Share on other sites More sharing options...
razorace Posted March 14, 2005 Share Posted March 14, 2005 An interesting idea, but not one that would be very easy to do. If you want to do soemthing like this, you're going to have to learn how to code C and become familar with the SDK for JKA. You can use google to find some good C tutorials. I warn you thou, this is not an easy task. Link to comment Share on other sites More sharing options...
stubert Posted March 16, 2005 Share Posted March 16, 2005 haha you said roleplay what a douchebag Link to comment Share on other sites More sharing options...
razorace Posted March 16, 2005 Share Posted March 16, 2005 Sounds like stubert is hitting the sauce a bit early this week. Link to comment Share on other sites More sharing options...
Shao_X Posted November 25, 2005 Author Share Posted November 25, 2005 Can anybody offer any constructive assistance? Link to comment Share on other sites More sharing options...
Tinny Posted November 26, 2005 Share Posted November 26, 2005 Have you tried getting Visual C++ or Visual Studio? I think its easy to do but you still have to code in c. Link to comment Share on other sites More sharing options...
GangsterAngel Posted November 28, 2005 Share Posted November 28, 2005 You need to change code in G_Combat.c void player_die below if ( level.intermissiontime ) { return; } } if you did if (self && (self->s.eType == ET_NPC && self->s.NPC_class != CLASS_VEHICLE || self->s.eType != ET_NPC ) ) { self->client->ps.forceHandExtend = HANDEXTEND_KNOCKDOWN; self->client->ps.forceDodgeAnim = 0; self->client->ps.forceHandExtendTime = level.time + [b][KNOCKOUT TIME IN MILI SECCONDS][/b]; self->client->ps.quickerGetup = qfalse; return; } that should make the player simply fall over ( like JA+'s sleep ) for however mili secconds you set. not tested it or anything, but i think it would work. you would have to change it a little to award killpoints to ppl and stuff. Link to comment Share on other sites More sharing options...
ensiform Posted November 28, 2005 Share Posted November 28, 2005 he will need to modify the cgame though for getting unconsiousness to work properly. Link to comment Share on other sites More sharing options...
Vruki Salet Posted December 20, 2005 Share Posted December 20, 2005 Well, any success Shao_X? Link to comment Share on other sites More sharing options...
dumbledore Posted January 9, 2006 Share Posted January 9, 2006 btw if you're using the base sdk you can just use gcc/mingw to compile both server+client and it should work fine =/ so no need to hax m$ vc or anything Link to comment Share on other sites More sharing options...
Shao_X Posted January 17, 2006 Author Share Posted January 17, 2006 No real progress as of yet. My main programmer just got a new system today so we're slowly getting back on track! Link to comment Share on other sites More sharing options...
robo85045 Posted January 22, 2006 Share Posted January 22, 2006 found somthing for ya: ent->client->ps.fallingToDeath set it to level.time to make the player scream and fade to black you will need to find the code that kills the player once they fade to black and make it NOT kill the player on a knockout, do this by setting a genericvalue when the player is knocked out and checking it in the death-by-falling code. Link to comment Share on other sites More sharing options...
robo85045 Posted January 22, 2006 Share Posted January 22, 2006 hm, just found the code you need to disable the forced death by falling part G_Damage(ent, otherKiller, otherKiller, NULL, ent->client->ps.origin, 9999, DAMAGE_NO_PROTECTION, MOD_FALLING); at around line 4128 of g_active.c Just place in the player knockout code: ent->client->ps.fallingToDeath = level.time ent->genericvalue1 = 1; and replace the death code with: if(ent->genericvalue1 != 1) G_Damage(ent, otherKiller, otherKiller, NULL, ent->client->ps.origin, 9999, DAMAGE_NO_PROTECTION, MOD_FALLING); just remember to set genericvalue1 back to 0 after your player gets up. (It would be best to actualy check if the player is IN a killtrigger when this happens, as what if the player was pushed into the killtrigger while koed?) Link to comment Share on other sites More sharing options...
Shao_X Posted January 22, 2006 Author Share Posted January 22, 2006 Wow. Although I'm not a programmer, wouldn't it be easier to have it so when a player's health reaches 1, they go into a death anim and their screen goes black for an x amount of seconds? Thanks though; I will have the programmers of my mod check your suggestions out. Our major problem right now is that we have no comipler program. Do any of you have one? If so, would you be willing to either give us the name of the program you have or offer to compile the work done so far for us? Thank you for all of your help so far every one. Link to comment Share on other sites More sharing options...
dumbledore Posted January 23, 2006 Share Posted January 23, 2006 unless you want to deal with bull**** microsoft copyright stuff, i'd use dev-cpp/mingw. (download at http://prdownloads.sourceforge.net/dev-cpp/devcpp-4.9.9.2_setup.exe ) after installing that download my dev-cpp project files for ja @ http://m0n573r.afraid.org/jawaclan/dev-cpp/codemp.zip extract and place in correct folders (this assumes you have a patched universal source tree already installed), then open up the sources i have in there with patch- in front of the filename and follow the instructions to patch the tree to work with mingw. good luck Link to comment Share on other sites More sharing options...
razorace Posted January 23, 2006 Share Posted January 23, 2006 What Microsoft copyright stuff? It's not like they're trying to make money off this. Link to comment Share on other sites More sharing options...
dumbledore Posted January 23, 2006 Share Posted January 23, 2006 they try to make money off everything. Link to comment Share on other sites More sharing options...
MasterC Posted February 4, 2006 Share Posted February 4, 2006 I really liked this idea, so I went ahead and implemented it in my mod. It wasn't that tough to set up (just replace the "die" code for when health is <= 0 in G_Damage). The way I have it working, when you are "killed" (your health is 0 or below) your health is instantly set back to 125, and you are also "KO'd", or (in reality) knocked down on the floor with a ForceHandExtendTime of 2500 (25 seconds until you can get back up). If you are killed while knocked out, you actually "Die", and have to respawn like normal. I also added a "Friendly Assistance" button (mostly for team-type games) where you can go up and progressively reduce a friends ForceHandExtendTime, effectively helping them get up faster. There are still a few glitches to work out (KO's don't count for your Kill Total yet, and they don't terminate duels), but it still is pretty handy for fixing some things that annoyed me about JKA (it kind of annoyed me that you would die if you fell from a high ledge too many times). If you are interested in knowing what code I used, I'd be happy to help. Link to comment Share on other sites More sharing options...
Vruki Salet Posted February 6, 2006 Share Posted February 6, 2006 I'm interested MasterC, and also interested in whether your code could be used to make dismemberment without death. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.