Hi Domenico,
It looks as if you may have intended some of the tests and updates specified in the Script to take place during run time (while the Sound is playing) rather than at compile time (which is when all the Smalltalk code will be evaluated, before the Sound starts). So the first step is to tease apart which actions should take place in real time and which could take place before the Sound starts. It looks to me like the following actions are intended to take place while the Sound is running:
1 to: 4 do: [:j |
1 to: 4 do: [:i |
((preyposition at: i) = (predatorposition at: j)) ifTrue: [hunt at: i put: 1]]].
and
1 to: 4 do: [:j |
hunt start: 0 s
die: ('die' & i) asHotValue
hunt: (hunt at: i)
]
Is that correct?