* Doesn't have to be the closest to the world object at all. Just as long as is less than 100m or so away is fine (in Arma2 the engine doesn't complain about the distance until it is > 400m, though it will work at any distance).
* I suspect that you need to use the "killed" handler rather than the "hit" handler on this sort of object, since I'm not sure they would have a hit handler at all. Try hit if you want it to explode immediately, but killed if that doesn't work.
* The number, 1231344, in the example should be changed to the ID number you see in the editor at the barrel's position. Just making that very clear, since it was only implied before. You will need one logic per barrel with the correct ID number in it.