JediBantha Posted December 18, 2013 Share Posted December 18, 2013 After many tries, I finally got this one to work, except that it does the same thing as the old Grip whenever I set it to anything other than zero. #define BUTTON_FORCEGRIP 64#define BUTTON_FORCEGRASP 64 Is there anything I can do to fix this? Link to comment
Raz0r Posted December 19, 2013 Share Posted December 19, 2013 The buttons are stored in a bit-field. 64 is the 7th bit (represented as "0100 0000", or 64) In base, there are 12 buttons being used, so you'll have to make your new force-power be the 13th button, i.e. the 13 bit (represented as "0001 0000 0000 0000", or 4096) You can then access it via /bind x +button12 Link to comment
JediBantha Posted December 19, 2013 Author Share Posted December 19, 2013 So if I were to make a 14th button, would I have to do 1 * 2 * 2 * 2 (and so forth) to get the proper value for it, and type that number in? Link to comment
Raz0r Posted December 19, 2013 Share Posted December 19, 2013 Yep. You can double the previous value. You can only have up to 15 buttons in Raven's jamp.exe, and 16 in OpenJK without engine modifications. Link to comment
JediBantha Posted December 20, 2013 Author Share Posted December 20, 2013 Also, I'm trying to figure out how to loop the "BOTH_PULLED_INAIR_F" and "BOTH_PULLED_INAIR_B" anims for the new grip. Every time I lift someone up, the anim always freezes at it's last frame. I recall a mod called "Telekinesis" on JK3Files, which replaced the choke anim for the old grip, but I've never swapped anims myself. Link to comment
eezstreet Posted December 20, 2013 Share Posted December 20, 2013 To make the animations loop, I believe that's part of the animations.cfg that needs to be edited. I don't remember which part in particular. Link to comment
Circa Posted December 20, 2013 Share Posted December 20, 2013 It's the second to last number of the line. Make it zero to loop. eezstreet, katanamaru and Archangel35757 like this Link to comment
katanamaru Posted December 20, 2013 Share Posted December 20, 2013 The quick explanation of what Circa is showing you is:Animation name, the the starting frame of the animation, the number of frames in the animation, wheiter it plays once (-1) or loops (0), and the speed (normally 20 or 40) Circa likes this Link to comment
Archangel35757 Posted December 21, 2013 Share Posted December 21, 2013 But if the animation was not designed to loop (last frame blending back to first frame) then it will probably have a noticeable glitch as it loops. katanamaru and Circa like this Link to comment
eezstreet Posted December 21, 2013 Share Posted December 21, 2013 Those two are meant to loop, I believe. Link to comment
katanamaru Posted December 23, 2013 Share Posted December 23, 2013 But if the animation was not designed to loop (last frame blending back to first frame) then it will probably have a noticeable glitch as it loops.Indeed it will. Link to comment
JediBantha Posted December 31, 2013 Author Share Posted December 31, 2013 'Kay, now how do I make it so Grip can now lift objects? Link to comment
Raz0r Posted December 31, 2013 Share Posted December 31, 2013 game/w_force.cvoid ForceGrip( gentity_t *self )Look for checks like: if ( !WP_ForcePowerUsable( self, FP_GRIP ) ) if ( tr.fraction != 1.0 && tr.entityNum != ENTITYNUM_NONE && g_entities[tr.entityNum].client && // <---- HERE !g_entities[tr.entityNum].client->ps.fd.forceGripCripple && g_entities[tr.entityNum].client->ps.fd.forceGripBeingGripped < level.time && ForcePowerUsableOn(self, &g_entities[tr.entityNum], FP_GRIP) && // <---- HERE (g_friendlyFire.integer || !OnSameTeam(self, &g_entities[tr.entityNum])) ) //don't grip someone who's still crippledModifying those checks to allow non-client entities should work.There might be other places in code that rely on the gripped object being a client. I'm not sure. Link to comment
JediBantha Posted December 31, 2013 Author Share Posted December 31, 2013 What about the SP version of grip? Link to comment
Raz0r Posted December 31, 2013 Share Posted December 31, 2013 Ah, not sure. It's probably very similar. Link to comment
ChalklYne Posted December 31, 2013 Share Posted December 31, 2013 This thread has peaked my interest. I have been asking for years how hard it would be to grip more than one person at a time depending on if they were in a certain proximity of each other. Link to comment
JediBantha Posted December 31, 2013 Author Share Posted December 31, 2013 I suppose you could grip multiple people if you hold down the "Use" button before gripping, like TFU1. EDIT: Btw, it's different from the SP Grip; different lines of coding. ChalklYne likes this Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now