Example: Scripting the IPD
-activateIn: (id) swarmContext {
[super activateIn: swarmContext];
script=[Script create: self];
[script setScriptFile: "script.txt"];
[script buildActions: self];
[script activateIn: self];
-invadeWithAllD: (int) n {
if(n > [playerList getCount])
n=[playerList getCount]-1;
[self shuffle: playerList];
index=[playerList begin: self];
while(i<n && (agent=[index next])){
[agent setPlayerType: 3];