I used this for my loap (Loap ancient evil)
You have to trigger it. I used two triggers, the first says that if a unit attacks the neutral player's unit to order that unit to attack the attacker. That works ok, but if too many units attack the same neutral unit, the neutral unit becomes confused and doesn't attack at all. The second trigger I used said that if a player attacked one of the neutral player's units more then 10 times in one minute. That the Neutral player would unally that player for 60 seconds.
In this example the player i refer to as 'Neutral player' needs to be set to 'computer' not 'neutral'