To give an exact answer, we would need to know how your player is detecting the damage and the overall setup of your nodes. Otherwise it won't adapt very well.
Having said that, one idea is to set up a bool variable
canTakeDamage (or similar). And link the animation of the crocodile to that variable. You may need to use custom signals (again we don't know your setup).
The code would look something like this:
var canTakeDamage : bool = false
//your code to react to damage
Hope this helps giving you some ideas to apply to your game.