early animation trigger with timeout()

early animation trigger with timeout()

hey guys,
i have a small problem not directly adressed by jquery but it is about a jquery animation.
  • i have a sequence where a stone is moved from one position to the next and so on
  • this is done by a for() loop where the function stone_move() is called
  • the animation is a jquery animate()
i use following code:
  1. var time = 0;
  2. for (var i = 0; i < ende; i++) {
  3.     ...
  4.     setTimeout(function(){stone_move(...)},time);
  5.     time += 800;
  6. };
the problem now is that the last movement is shown immeadiatly and all other movement animations are skipped. i want something like this:
  1. time = 0 //1. Movement of Stone
  2. time = 800 //2. Movement of Stone
  3. time = 1600 //3. Movement of Stone
  4. ...
  5. Duration of animation = 700ms 
  6. --> mathematically a sequence of 3 moves should take 2500ms in total

hope you can help me -> my head is spinning around right now