Actually, this is very realistic to do and would run fairly fast. I basically do the same check operation for 4 joints every turn in punchout, along with a gob of light trig, and there's no real heavy slowdown. I think the way you wanted to go about it is right, as far as checking a pre-made distance table that you build at start of match, with a +- .01 or .02 allowance for compression and stretching that joints do (do they? looks like it sometimes, lol). Use Pythagorean theorem to check distance (you can use the function i used in punchout if you want to save time) between a joint and the one its connected to, and if distance exceeds the distance in the precomputed table, then set the a limp flag in a table for that joint to 1, along with all the other ones its connected to heading towards outside of limbs. After all that checking, then every frame iterate thru the flag table and force limp the joints that are flagged. Worth a shot anyway...
Another way to totally prevent slowdown from distance checks would be to only do a distance check for both players when one takes damage. If there was any lag, that should pretty much solve it. Give it a shot! This will be a sweet script
Last edited by NewbLuck; Aug 21, 2007 at 01:20 AM.
Reason: typomatic lol