-
Posts
123 -
Joined
-
Last visited
Profile Information
-
Gender
Not Telling
Recent Profile Visitors
2,643 profile views
Serenity937's Achievements
-
Chen_tu liked a tutorial: Adding Force fall sp/mp
-
This is an easy one as you only need to alter bg_pmove.cpp (sp) or bg_pmove.c (mp) first locate this piece of code in bg_pmove.cpp (sp) or bg_pmove.c (mp) void PM_GrabWallForJump( int anim ) {//NOTE!!! assumes an appropriate anim is being passed in!!! under this add the following in bg_pmove.cpp (sp) //[FORCE FALL] //The FP cost of Force Fall #define FM_FORCEFALL 10 //the velocity to which Force Fall activates and tries to slow you to. #define FORCEFALLVELOCITY -250 //Rate at which the player brakes int ForceFallBrakeRate[NUM_FORCE_POWER_LEVELS] = { 0, //Can't brake with zero Force Jump skills 60, 80, 100, }; //time between Force Fall braking actions. #define FORCEFALLDEBOUNCE 100 qboolean PM_CanForceFall() { return (!PM_InRoll(pm->ps) // not rolling && !PM_InKnockDown(pm->ps) // not knocked down && !PM_InDeathAnim() // not dead && !PM_SaberInSpecialAttack( pm->ps->torsoAnim) // not doing special attack && !PM_SaberInAttack(pm->ps->saberMove) // not attacking && !(pm->ps->pm_flags&PMF_JUMP_HELD) // have to have released jump since last press && pm->cmd.upmove > 10 // pressing the jump button && pm->ps->velocity[2] < FORCEFALLVELOCITY // falling && pm->ps->groundEntityNum == ENTITYNUM_NONE // in the air && pm->ps->forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 //have force jump level 2 or above && pm->ps->forcePower > FM_FORCEFALL // have atleast 5 force power points && pm->waterlevel < 2 // above water level && pm->ps->gravity > 0); // not in zero-g } qboolean PM_InForceFall() { int ForceManaModifier = 0; int FFDebounce = pm->ps->forcePowerDebounce[FP_LEVITATION] - (pm->ps->forcePowerLevel[FP_LEVITATION] * 100); // can player force fall? if (PM_CanForceFall()) { // play special animation when player has the saber or melee if (pm->ps->weapon == WP_MELEE || pm->ps->weapon == WP_SABER) { PM_SetAnim( pm, SETANIM_LEGS, BOTH_FORCEINAIR1, SETANIM_FLAG_OVERRIDE, 150); } else { PM_SetAnim( pm, SETANIM_LEGS, BOTH_FORCEINAIRBACK1, SETANIM_FLAG_OVERRIDE, 150); } // reduce falling velocity to a safe speed at set intervals //Warning: Dirty Hack ahead! if (FFDebounce + FORCEFALLDEBOUNCE < pm->cmd.serverTime) { if (pm->ps->velocity[2] < FORCEFALLVELOCITY) { if( (FORCEFALLVELOCITY - pm->ps->velocity[2]) < ForceFallBrakeRate[pm->ps->forcePowerLevel[FP_LEVITATION]]) { pm->ps->velocity[2] = FORCEFALLVELOCITY; } else { pm->ps->velocity[2] += ForceFallBrakeRate[pm->ps->forcePowerLevel[FP_LEVITATION]]; } } } // is it time to reduce the players force power if (pm->ps->forcePowerDebounce[FP_LEVITATION] < pm->cmd.serverTime) {// FP_LEVITATION drains force mana only when player // has an upward velocity, so I used FP_HEAL instead WP_ForcePowerDrain(pm->gent, FP_HEAL, FM_FORCEFALL + ForceManaModifier); // removes force power at a rate of 0.1 secs * force jump level pm->ps->forcePowerDebounce[FP_LEVITATION] = pm->cmd.serverTime + (pm->ps->forcePowerLevel[FP_LEVITATION] * 100); } // player is force falling return qtrue; } // player is not force falling return qfalse; } //[/FORCE FALL] or this bg_pmove.c (mp) //[FORCE FALL] //The FP cost of Force Fall//serenity #define FM_FORCEFALL 10 //the velocity to which Force Fall activates and tries to slow you to. #define FORCEFALLVELOCITY -250 //Rate at which the player brakes int ForceFallBrakeRate[NUM_FORCE_POWER_LEVELS] = { 0, //Can't brake with zero Force Jump skills 60, 80, 100, }; //time between Force Fall braking actions. #define FORCEFALLDEBOUNCE 100 qboolean PM_CanForceFall() { return (!BG_InRoll(pm->ps, pm->ps->legsAnim) // not rolling && !PM_InKnockDown(pm->ps) // not knocked down && !BG_InDeathAnim(pm->ps->legsAnim) // not dead && !BG_SaberInSpecialAttack(pm->ps->torsoAnim) // not doing special attack && !BG_SaberInAttack(pm->ps->saberMove) // not attacking && BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_HEAL) // can use force power && !(pm->ps->pm_flags & PMF_JUMP_HELD) // have to have released jump since last press && pm->cmd.upmove > 10 // pressing the jump button && pm->ps->velocity[2] < FORCEFALLVELOCITY // falling && pm->ps->groundEntityNum == ENTITYNUM_NONE // in the air && pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 //have force jump level 2 or above && pm->ps->fd.forcePower > FM_FORCEFALL // have atleast 5 force power points && pm->waterlevel < 2 // above water level && pm->ps->gravity > 0); // not in zero-g } qboolean PM_InForceFall() { int ForceManaModifier = 0; int FFDebounce = pm->ps->fd.forcePowerDebounce[FP_LEVITATION] - (pm->ps->fd.forcePowerLevel[FP_LEVITATION] * 100); // can player force fall? if (PM_CanForceFall()) { // play special animation when player has the saber or melee if (pm->ps->weapon == WP_MELEE || pm->ps->weapon == WP_SABER) PM_SetAnim(SETANIM_BOTH, BOTH_FORCEINAIR1, SETANIM_FLAG_OVERRIDE | SETANIM_FLAG_HOLD, 150); // reduce falling velocity to a safe speed at set intervals //Warning: Dirty Hack ahead! if (FFDebounce + FORCEFALLDEBOUNCE < pm->cmd.serverTime) { if (pm->ps->velocity[2] < FORCEFALLVELOCITY) { if( (FORCEFALLVELOCITY - pm->ps->velocity[2]) < ForceFallBrakeRate[pm->ps->fd.forcePowerLevel[FP_LEVITATION]]) { pm->ps->velocity[2] = FORCEFALLVELOCITY; } else { pm->ps->velocity[2] += ForceFallBrakeRate[pm->ps->fd.forcePowerLevel[FP_LEVITATION]]; } } } // creates that cool Force Speed effect //pm->ps->powerups[PW_SPEED] = pm->cmd.serverTime + 100; // is it time to reduce the players force power if (pm->ps->fd.forcePowerDebounce[FP_LEVITATION] < pm->cmd.serverTime) { // reduced the use of force power for duel and power duel matches if (pm->gametype == GT_DUEL || pm->gametype == GT_POWERDUEL) ForceManaModifier = -4; // FP_LEVITATION drains force mana only when player // has an upward velocity, so I used FP_HEAL instead BG_ForcePowerDrain(pm->ps, FP_HEAL, FM_FORCEFALL + ForceManaModifier); pm->ps->fd.forceJumpSound = 1; // removes force power at a rate of 0.1 secs * force jump level pm->ps->fd.forcePowerDebounce[FP_LEVITATION] = pm->cmd.serverTime + (pm->ps->fd.forcePowerLevel[FP_LEVITATION] * 100); } // player is force falling return qtrue; } // player is not force falling return qfalse; } Now we have to add 2 more check s Locate this piece of code in bg_pmove.cpp (sp) or bg_pmove.c (mp) static qboolean PM_CheckJump( void ) { and now add this static qboolean PM_CheckJump( void ) { //[FORCE FALL] if (PM_InForceFall()) return qfalse; //[/FORCE FALL] and finally Locate this piece of code in bg_pmove.cpp (sp) or bg_pmove.c (mp) static void PM_CrashLand( void ) { at the very bottom of this piece of code add this if(PM_InForceFall()) { return; } Now compile the code and do some Massive jumps
-
Darth Sion liked a post in a topic: Evolution of Combat IV - Main Topic
-
Darth Sion liked a post in a topic: Evolution of Combat IV - Main Topic
-
Evolution of Combat IV - Main Topic
Serenity937 replied to MattFiler's topic in WIPs, Teasers & Releases
Some Early developments -
Serenity937 liked a post in a topic: Evolution of Combat IV - Main Topic
-
Darth Sion liked a post in a topic: EoCIII Crashing
-
Darth Sion liked a post in a topic: Evolution of Combat IV - Main Topic
-
Darth Sion liked a post in a topic: Evolution of Combat IV - Main Topic
-
Serenity937 liked a post in a topic: Evolution of Combat IV - Main Topic
-
Bek liked a post in a topic: Evolution of Combat IV - Main Topic
-
Serenity937 liked a post in a topic: Evolution of Combat IV - Trailer
-
Darth Sion liked a post in a topic: Evolution of Combat IV - Trailer
-
JAWSFreelao liked a post in a topic: Evolution of Combat IV - Main Topic
-
No you don't need EoCIII Only JKA installed and patched is required
-
Evolution of Combat IV - Main Topic
Serenity937 replied to MattFiler's topic in WIPs, Teasers & Releases
Have you checked out my video logs? -
Lancelot liked a post in a topic: Evolution of Combat IV - Main Topic
-
Evolution of Combat IV - Main Topic
Serenity937 replied to MattFiler's topic in WIPs, Teasers & Releases
Sorry ,unless someone else want to do it.no Hi guys Hopefully you had a chance to see what we are trying to achieve . 1. Uniformity . It always annoyed me that single player and multi player combat systems were different from each other. I understand why there different but i never liked it anyway. The first task with the mod is to get mp/sp exactly the same (or a near as dammit) taking into account that 1 is played with 0 latency and the other could be 80-120 ping for some people. 2. Inspirations My first and most important inspiration is the films.If you truly want to understand EoC sabersystem then you have to really,really watch the sabercombat. https://www.youtube.com/watch?v=lN7dkSIgYgE Look how quigon Blocks,Dodges and moves his legs.The pace of attack and defence.He slaps and kicks his enemys "NO SILLY JUMPING ABOUT" This is where the message is often lost.People compare the sabersystem to base,ojp Moviebattles etc etc. It should (but sadly never has been) be compared to the movies style. It contain elements and ideas from all mods,as all mods contain elements from the movies. My second inspiration is The mods themselves. Like everybody else i played all the popular mods,but in many cases i found them unbalanced or unfair. Im not going to name any mods here because i dont want to start any pointless debate about opinions. However ,In the early days some mods came out and were fantastic but as time went on they got updated and changed and on the way they lost something and it became more about Points and bars on the screen.People look to see the block point bar on the screen and can measure from there BP when to go for a kill.This is predictable and repetitive. It leaves little to the imagination and make sabercombat a simple routing that is followed to the letter or you fail. I understand its "All about balance" so i decided to go back to basics (stawars basics ,whatever that means!). Lets stick to sabercombat for now ill talk about guns later.I was in the British army for 18 years so i count myself as a bit of an authority on combat in general . The sabersystem is built to allow much more freedom of movement.Im not going to talk code here but i did it by chaining and splicing lots of animations code in the sabersystem code. I have not "AND NEVER WILL" write a tutorial for the sabersystem. I have made a video to get people started But after that it is up to people to develop there own style- "Feel the force flowing through you".........Who said that????? The sabersystem in mp and sp is almost identical so practice in the training room with tavion. Some basic tips. walking in close saber contact will reduce the amount of force used to block some types of attack . Accurate blocking will tire your opponent quickly Use of slaps and kicks in close combat is advised to stun your enemy and create a opening for attack. Crouch or meditate to regain your forcepowers at x2 speed Dont let your force powers drop below 25 fp in saber combat, blocking lightning can be very difficult at close range as close lightning now inflicts more damage and costs more to block .Warning Bots and Npc,s can see if your tired or low on fp by your animations and will strike harder if they get a chance. Im personally a singleplayer fan more than Multiplayer and i can tell you this.If you like Mp sabersystem/anims and A.I then you going to love using the same sabersystem combat system anims etc etc in singleplayer. Im especially proud of the A.I in sp and spent months on end building there combat.They have about 15 more animations than the player gets.I did this on purpose so they are unpredictable with the animations and can be very hard to kill in some cases. I made stormtroopers and Imp soldiers relatively hard.They are a well trained army in weapon combat and unarmed combat.They will kick your ass if you get close,they may punch/ kick or butt stroke you with there weapon. Saber users come in varying difficulty .But there are no un-experianced sith/Jedi in the field of combat. So dont expect them to be easy after they have years of training and experience,And of course if you face Desann or yoda or any "Master" then you can expect megga aggression, Very High speed combat and there force power ability's are Way better than yours...Trust me.If you play sp and spawn yoda in game to help you.Just watch him Kicking ass."HE IS AWESOME TO WATCH".He has his own full animations and seperate saberstyles too. This is a quote from another post but i wanted to add it here so people can get the info. OK guys ...Flame on :winkthumb: -
Hi mate The crashing problem you speak of is something that plagued EoCIII. I spent an absolute age trying to find what caused the crash and i also came to the conclusion that a gunner bot is the cause. From my side i can say this.I went through the code gunner class system with a fine tooth comb, almost to the point of totally rebuilding the gunner class system. And can say that there is not 1 gunner bot that "does something" code related that causes the crash.Not 1 bot does something different from another gunner bot that could cause the crash.If this was not the case it would mean every gunner bot crashes the mod when they do whatever it is that is causing the crash. This leads me to believe that there is something in the Botfiles themselves. I am willing to bet if you check every single .JKB bot file you will find one with an error like this. GeneralBotInfo { reflex 500 accuracy 1 turnspeed 0.01 turnspeed_combat 0.05 maxturn 360 perfectaim 1 chatability 1 chatfrequency 3 hatelevel 3 camper 0 saberspecialist 0 forceinfo 7-2-000000000000000000 }} Now i don't expect you to check and read and correct every single bot .jkb file. Thats my fault.But if you do want to stop this crash to screen when a certain gunner bot either spawns in or dies or fires a specific weapon. Thats where i would start I do believe this happens when the code reads a certain part of the .jkb file....but i could be wrong. Hopefully this might help. and sorry for the error that i never found
-
Evolution of Combat IV - Main Topic
Serenity937 replied to MattFiler's topic in WIPs, Teasers & Releases
Want to add a skin to the class system in EoCIV ? No problem PM me and ill add it,build how you wish saber sith/jedi/weapons i can add any personal class.In EoC i also added a class building system but only for gunners.In EoC jedi are jedi,sith are sith.You can select force powers but restricted to saber only.Gunners get a start weapon then after that you have to kill some one and take there weapon if you want one. "ITS STAR WARS not STAR FREE FOR ALL" so no weapons lying on maps in mp or sp. -
Evolution of Combat IV - Main Topic
Serenity937 replied to MattFiler's topic in WIPs, Teasers & Releases
Here is a nice review people might want to see. Credit for the good review should also go to stoiss for his massive,excellent effort in making the sabersystem in EoCIII for EoC 1 and 2 also.Even though he no longer works on EoC.His contributions to EoC will live on. Respect to my friend stoiss. -
Serenity937 liked a post in a topic: Hi from Sith-J
-
Star Wars Episode VII Discussion
Serenity937 replied to Circa's topic in Star Wars Franchise Discussions
The 7th film is about the new characters coming together then re-uniting the old team(chewie,han etc) and the search for luke who only turns up in the final quarter.The bad guys chasing leads by capturing rebels and using torture and mind control to find more rebels ,with the ultimate goal of finding skywalker and bringing him to justice for the murder of vader and palpatine. Skywalker now living like Oldben or a hermit keeps an eye on the kid from afar(His sister knows where he is).Laying low to protect his family from persecution.He himself has become a legend of folk law.The stories of his rise help as a inspiration for the rebels (Led by the princess).Just as in "A new hope" the film ends with a small but very significant victory,Ultimately bringing on the full wrath of the bad guys who are going to give the rebels a kicking in the 8th film.Things you will see like "A new chosen one".And a spiritual teacher from the past.Made the film much more Familiar for old gits like me. -
About sabersystems mod existing on the web.
Serenity937 replied to Hels's topic in Jedi Knight General Discussions
Ok yes ill do 2 versions ,an installer and a asset.zip -
About sabersystems mod existing on the web.
Serenity937 replied to Hels's topic in Jedi Knight General Discussions
Sabersystem tutorial http://www.moddb.com/mods/serenitysabersystems/videos/serenitysabersystem-tutorial-part-1#imagebox http://www.moddb.com/mods/serenitysabersystems/videos/sabering-tutorial-part-2#imagebox pretty much all you need to get started -
The evolution of combat 1,2 and 3 sabersystem was built "on top" of the ojp system. so we started with ojp 1.2 enhanced code base and built on top of that. Evolution of combat IV is built from the very first released code that hit the web. Obviously much work was needed to get it running .ask any of the coders from openjk about the amazing work they have done if you dont believe me. The sabersystem coding started with the singleplayer side of the code.Firstly i had to re learn many things as up until that point i had only worked with mp code. The singleplayer sabersystem was finished after 8 months of steady hobby coding.I basically looked at the movies for my inspiration. No lie.......honestly.. I watched some battles frame for frame, watching speed.leg movements, meterial impacts saber v saber, saber v walls, saber v blaster bolt. etc etc Obviously this can only result in the sabersystem being "MY" interpretation of what i saw.No more jumping around like a baffooooon .As most old school Jka players do.general bad habits picked up from playing Jko and brought in to Jka.... Remember "My" Interpretation "My" views. ....so dont bother arguing with me on this ,because i dont give a shit and wont respond. I always thought JKO/JKA sabersystems were only half finished and as a result they added a lot of stupid shit to spice it up... I watched fencing videos, swordsmanship videos, ninja vids, fan vids, startwars fan vids. Then this got my attention. No stupid jumping around ,timed calculated ,and MOST important...Realistic attacks. A real blocking system that is as difficult to master as the attack systems. And thats why many people do not like this mod .they find it sometimes too slow, too fast, too complicated. but i stress.nothing in life is easy.not everybody can master everything. .This mod does and always will have elements of OJP in singleplayer and multiplayer. both singleplayer and multiplayer sabersystems are built as identically as possible, sharing much of the same code. the BOTS and NPC,s have there own separate sabersystems now. they can do things that you cannot, you can do things that they cannot. I can confirm that both MP+SP sabersystems are fully finished now and i have been playing with the idea of some sort of demo release. So if you do not know EoC at all i can only suggest maybe you try this http://www.moddb.com/mods/evolution-of-combat-iii-remastered but if you want more info before committing to a large download. Most of your answers can be found by reading the mods name.That means no extra maps,models,weapons. it means an evolution of what you already have. the question is...Is it something for you??? or are you just happy to hop around like a hamster,hoping for a lucky hit. If you think its better to walk in to a room full of stormtroopers. press saberthrow then your saber flies around the room killing every stormtrooper in the room as you stand and watch, then DO NOT DOWNLOAD THIS MOD. because its not for you.... If you think its better to walk in to a room full of stormtroopers. They all shoot at you and they just stand there like idiots but not 1 blaster hits you because they are all so shit , then DO NOT DOWNLOAD THIS MOD. because its not for you.... If you want to learn something along the way,if you want a real challenge where its perfectly possibly that your going to get your ass kicked and you might actually learn from that then take a look............ I hope this has been helpful to you. Here is a recent comment on the download page the full message can be read here http://www.moddb.com/mods/evolution-of-combat-iv/news/eociv-preview-1
-
Serenity937 liked a post in a topic: Revival of JKA's modding community
-
Serenity937 liked a post in a topic: Revival of JKA's modding community
-
Its a fair point,Its meant to be just sort of a small introduction to say "its being made". Evolution of Combat is kind of a small mod that only interests a small group of people"Its not everybody,s cup of tea". The aim of the new moddb page and video is to bring people from the old EoCIII moddb page to the new,to avoid any confusion about what build ,what update ,etc,etc. So its really a message for the people who have followed the mod for the last 5 years.Having said that....... New people are always welcome to come and try it. So your post comes at me as if its from someone who maybe has not come across the mod before ,and thats because the mod has only a small fan base mainly from a Russian community. So in answer to your fair question i can only say its everything Evolution of Combat III has but in a new code "The old one is OJP and no EXE stuff".However im much better at coding now than i was 5/6 years ago and this enables me to correct any bugs i might have missed 5 years ago. And of course build on new ideas.The big bonus is that i am able to say for singleplayer is the mod now runs Jedi outcast flawlessly after almost 2 years working on just that. singleplayer and multiplayer now share an Identical sabersystem, guns systems and melee combat ,all the manual saberblocking, meleeblocking dodging stuff is identical. 3 years working on Bot A.I and about 1 on NPC A.I . A now extensive BOT CLASS system and Player Class system for multiplayer. I am currently working on Weapons Buying with a point based ,savable,experiance/ reward system.in MP So i would maybe start here http://www.moddb.com/mods/serenitysabersystems/videos/serenitysabersystem-tutorial-part-1#imagebox Its a mod that basically makes everything harder to beat,hopefully without going in to the Impossible to beat arena. Well i hope this helps get you started no need for people to "stress out". Big thanks to SiLink for doing a nice thing ,with good intentions .
-
Serenity937 liked a post in a topic: Evolution of Combat IV - Trailer
-
The are a few simple ways of adding weapon kick. The best way is through code. to avoid confusion i added a new button command. // // usercmd_t->button bits, many of which are generated by the client system, // so they aren't game/cgame only definitions // #define BUTTON_ATTACK 1 #define BUTTON_TALK 2 // displays talk balloon and disables actions #define BUTTON_USE_HOLDABLE 4 #define BUTTON_GESTURE 8 #define BUTTON_WALKING 16 #define BUTTON_USE 32 #define BUTTON_FORCEGRIP 64 #define BUTTON_ALT_ATTACK 128 #define BUTTON_ANY 256 #define BUTTON_FORCEPOWER 512 #define BUTTON_FORCE_LIGHTNING 1024 #define BUTTON_FORCE_DRAIN 2048 #define BUTTON_FREE 4096 //+button12 #define BUTTON_KICK 8192 //+button13 #define BUTTON_BLOCK 16384 //+button14 #define MOVE_RUN 120 dont forget to add the button to the menus {"+button9", -1, -1, -1, -1}, {"+button10", -1, -1, -1, -1}, {"+button11", -1, -1, -1, -1}, {"+button12", -1, -1, -1, -1}, {"+button13", -1, -1, -1, -1}, {"+button14", -1, -1, -1, -1}, {"+button15", -1, -1, -1, -1}, {"victory", -1, -1, -1, -1}, {"dropsaber", -1, -1, -1, -1}, {"proneup", -1, -1, -1, -1}, {"pronedown", -1, -1, -1, -1}, {"saberdown", -1, -1, -1, -1}, }; then just pop the button command in bg pmove c static void PM_Weapon( void ) { // make weapon function if ( pm->ps->weaponTime > 0 ) { pm->ps->weaponTime -= pml.msec; } else { if (pm->cmd.buttons & BUTTON_KICK) { //ok, try a kick I guess.//allow them to do the kick now! if (!BG_KickingAnim(pm->ps->torsoAnim) && !BG_KickingAnim(pm->ps->legsAnim) && !BG_InRoll(pm->ps, pm->ps->legsAnim) && !BG_KickMove( pm->ps->saberMove ) && pm->ps->groundEntityNum != ENTITYNUM_NONE) { int kickMove = PM_KickMoveForConditions(); if (kickMove != -1) { if ( pm->ps->groundEntityNum == ENTITYNUM_NONE ) {//if in air, convert kick to an in-air kick float gDist = PM_GroundDistance(); if ((!BG_FlippingAnim( pm->ps->legsAnim ) || pm->ps->legsTimer <= 0) && gDist > 64.0f && //strict minimum gDist > (-pm->ps->velocity[2])-64.0f) { switch ( kickMove ) { case LS_KICK_F: kickMove = LS_KICK_F_AIR; break; case LS_KICK_B: kickMove = LS_KICK_B_AIR; break; case LS_KICK_R: kickMove = LS_KICK_R_AIR; break; case LS_KICK_L: kickMove = LS_KICK_L_AIR; break; default: //oh well, can't do any other kick move while in-air kickMove = -1; break; } } else { //off ground, but too close to ground kickMove = -1; } } } if (kickMove != -1) { int kickAnim = saberMoveData[kickMove].animToUse; if (kickAnim != -1) { PM_SetAnim(SETANIM_BOTH, kickAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD,100); if (pm->ps->legsAnim == kickAnim) { pm->ps->weaponTime = pm->ps->legsTimer; return; } } } } //if got here then no move to do so put torso into leg idle or whatever if (pm->ps->torsoAnim != pm->ps->legsAnim) { PM_SetAnim(SETANIM_BOTH, pm->ps->legsAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD,100); } pm->ps->weaponTime = 0; return; } } else if ((pm->cmd.buttons & BUTTON_KICK)|| (pm->cmd.buttons & BUTTON_ALT_ATTACK)) { //kicks if (!BG_KickingAnim(pm->ps->torsoAnim) && !BG_KickingAnim(pm->ps->legsAnim) && !BG_InRoll(pm->ps, pm->ps->legsAnim) && !BG_KickMove( pm->ps->saberMove ) && pm->ps->groundEntityNum != ENTITYNUM_NONE) { int kickMove = PM_KickMoveForConditions(); if (kickMove != -1) { if ( pm->ps->groundEntityNum == ENTITYNUM_NONE ) {//if in air, convert kick to an in-air kick float gDist = PM_GroundDistance(); //let's only allow air kicks if a certain distance from the ground //it's silly to be able to do them right as you land. //also looks wrong to transition from a non-complete flip anim... if ((!BG_FlippingAnim( pm->ps->legsAnim ) || pm->ps->legsTimer <= 0) && gDist > 64.0f && //strict minimum gDist > (-pm->ps->velocity[2])-64.0f //make sure we are high to ground relative to downward velocity as well ) { switch ( kickMove ) { case LS_KICK_F: kickMove = LS_KICK_F_AIR; break; case LS_KICK_B: kickMove = LS_KICK_B_AIR; break; case LS_KICK_R: kickMove = LS_KICK_R_AIR; break; case LS_KICK_L: kickMove = LS_KICK_L_AIR; break; default: //oh well, can't do any other kick move while in-air kickMove = -1; break; } } else { //off ground, but too close to ground kickMove = -1; } } } if (kickMove != -1) { int kickAnim = saberMoveData[kickMove].animToUse; if (kickAnim != -1) { PM_SetAnim(SETANIM_BOTH, kickAnim, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD,100); if (pm->ps->legsAnim == kickAnim) { pm->ps->weaponTime = pm->ps->legsTimer; return; } } } } else if ( (pm->cmd.buttons & BUTTON_KICK) ) { //kick after doing a saberthrow,whalst saber is still being controlled if ( (pm->cmd.forwardmove||pm->cmd.rightmove)//trying to kick in a specific direction && PM_CheckAltKickAttack() )//trying to do a kick {//allow them to do the kick now! int kickMove = PM_KickMoveForConditions(); if (kickMove != -1) { pm->ps->weaponTime = 0; PM_SetSaberMove( kickMove ); return; } } } else if ( pm->ps->saberInFlight && pm->ps->saberEntityNum ) {//saber is already in flight continue moving it with the force. PM_SetAnim(SETANIM_TORSO, BOTH_SABERPULL, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 100); pm->ps->torsoTimer = 1; return; } else if ( pm->ps->weaponTime < 1&& pm->ps->saberCanThrow && //pm->ps->fd.forcePower >= forcePowerNeeded[pm->ps->fd.forcePowerLevel[FP_SABERTHROW]][FP_SABERTHROW] && !BG_HasYsalamiri(pm->gametype, pm->ps) && BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_SABERTHROW) && pm->ps->fd.forcePowerLevel[FP_SABERTHROW] > 0 && PM_SaberPowerCheck() ) { in bg saber // Check for WEAPON ATTACK // ********************************************************* if((pm->cmd.buttons & BUTTON_ALT_ATTACK) && !(pm->cmd.buttons & BUTTON_ATTACK) && PM_DoKick()) { return; } else if(pm->ps->saberInFlight && pm->ps->forceHandExtend != HANDEXTEND_SABERPULL && pm->ps->fd.saberAnimLevel != SS_DUAL && (pm->cmd.buttons & BUTTON_ATTACK) ) {//don't have our saber so we can punch instead. PM_DoPunch(); return; } if ((pm->cmd.buttons & BUTTON_KICK)) { //ok, try a kick I guess. int kickMove = -1; if ( !BG_KickingAnim(pm->ps->torsoAnim) && !BG_KickingAnim(pm->ps->legsAnim) && !BG_InRoll(pm->ps, pm->ps->legsAnim) && pm->ps->saberMove == LS_READY && !(pm->ps->pm_flags&PMF_DUCKED)//not ducked && (pm->cmd.upmove >= 0 ) //not trying to duck )//&& pm->ps->groundEntityNum != ENTITYNUM_NONE) {//player kicks kickMove = PM_KickMoveForConditions(); } if (kickMove != -1) { if ( pm->ps->groundEntityNum == ENTITYNUM_NONE ) {//if in air, convert kick to an in-air kick float gDist = PM_GroundDistance(); //let's only allow air kicks if a certain distance from the ground //it's silly to be able to do them right as you land. //also looks wrong to transition from a non-complete flip anim... if ((!BG_FlippingAnim( pm->ps->legsAnim ) || pm->ps->legsTimer <= 0) && gDist > 64.0f && //strict minimum gDist > (-pm->ps->velocity[2])-64.0f //make sure we are high to ground relative to downward velocity as well ) { switch ( kickMove ) { case LS_KICK_F: kickMove = LS_KICK_F_AIR; break; case LS_KICK_B: kickMove = LS_KICK_B_AIR; break; case LS_KICK_R: kickMove = LS_KICK_R_AIR; break; case LS_KICK_L: kickMove = LS_KICK_L_AIR; break; default: //oh well, can't do any other kick move while in-air kickMove = -1; break; } } else {//leave it as a normal kick unless we're too high up if ( gDist > 128.0f || pm->ps->velocity[2] >= 0 ) { //off ground, but too close to ground kickMove = -1; } } } if (kickMove != -1) { PM_SetSaberMove( kickMove ); return; } } } //this is never a valid regular saber attack button pm->cmd.buttons &= ~BUTTON_KICK; // make weapon function if ( pm->ps->weaponTime > 0 ) { pm->ps->weaponTime -= pml.msec; } else { if (pm->cmd.buttons & BUTTON_BLOCK && !PM_SaberInBounce( pm->ps->saberMove ) && !PM_SaberInKnockaway( pm->ps->saberMove ) && !PM_SaberInBrokenParry( pm->ps->saberMove ) && !PM_SaberInDamageMove(pm->ps->saberMove)) { if ( !pm->ps->SaberActive()) { pm->ps->SaberActivate(); }//set up the block position PM_SetBlock(); } else if (pm->cmd.buttons & BUTTON_KICK) {//allow them to do the kick now! pm->ps->weaponTime = 0; PM_CheckKick(); return; } else { pm->ps->weaponstate = WEAPON_READY; } } there are a couple of ways to do it .hopefully this will get you started
-
Honestly mate! Its worth trying your hand at coding. Think small and start small,Set yourself a realistic goal,something small and you wont get overwhelmed at the start. Stay on one topic ,Animations is where i started. swapping them about. For your purpose i would select Class system. Get the openjk code (Its the best,stable and nice and clean). Then learn everything by searching through the code for 1 class type i suggest CLASS_R2D2. its a simple set up not too different to how you might want a decca to act. Unless your a genius i suggest doing a simple search for tutorials and also other released SDK ,s to learn from.