We need a scripting command to know if an object has been "allowDamage false" or true.
The suggested command is :
Syntax: damageAllowed object
Parameters: object: Object
Return Value: Boolean
The command is needed because we want to set temporary invulnerable an object.
But when finished, we want to restore the vulnerability only if no other script make it invulnerable too.