Similar to orderDroidObj() but for a group of droids |
function orderGroupObj(group,dorder,obj) { enumGroup(group).forEach(function(droid) { if (droid.type==DROID) orderDroidObj(droid,dorder,obj); }); } |
// when attacked, tell all droids in a "retalliationGroup" to attack the attacker eventAttacked = function(victim,attacker) { orderGroupObj(retalliationGroup, DORDER_ATTACK, attacker); } |
AvailabilityRequires:
|
See alsoRelated articles:
|