You can assign variables onto objects to reference later on. So in this case, 
%col is the 
AIPlayer object (after the if statements are checked of course) so to assign a variable to an object, you can do something like 
%col.LegMissing = true;. Now that this variable has been assigned, you can access it later on (in a package like jes00 is suggesting).
If you don't know what a package is, here's a little tutorial on how to set up a package, what it does, and how to correctly use one: 
Package TutorialNow you can package the 
AIPlayer::setCrouching method and access the variable (
.LegMissing) to see if the variable is true, and simply perform logic (not calling the parent in the packaged function).