# Precision kicking help!

**URL:** <https://discourse.codecombat.com/t/precision-kicking-help/10605>\
**Category:** Level Help\
**Created:** [February 18, 2017, 8:04am UTC](https://discourse.codecombat.com/t/precision-kicking-help/10605 "2017-02-18T08:04:48Z")\
**Posts on this page:** 2\
**Page:** 3

<div class="post-metadata">

**Author:** ![Deadpool198](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/deadpool198/32/16753_2.png) [@Deadpool198](https://discourse.codecombat.com/u/Deadpool198)\
**Post date:** [October 26, 2019, 1:12pm UTC](https://discourse.codecombat.com/t/precision-kicking-help/10605/42 "2019-10-26T13:12:52Z")

</div>

If you need help with your code please could you post it formatted ([instructions](https://discourse.codecombat.com/t/how-to-post-your-code-with-radiant-harmonious-formatting/1484)).  
Thanks,  
Danny

---

<div class="post-metadata">

**Author:** ![DavidAkinThe1st](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@DavidAkinThe1st](https://discourse.codecombat.com/u/DavidAkinThe1st)\
**Post date:** [February 27, 2026, 10:30am UTC](https://discourse.codecombat.com/t/precision-kicking-help/10605/43 "2026-02-27T10:30:18Z")

</div>

Can anyone help with mine? Here’s my code:

```python

while(true) {
    var blueskelly = hero.findEnemies();
    var ball = hero.findByType("ball")[0];
    var peasant = hero.findByType("peasant")[0];
    for (var i = 0; i < blueskelly.length; i++) {
        if (ball.velocity.magnitude() == 0) {
            var blue = blueskelly[i];
            var goal = Vector.subtract(blue.pos, ball.pos);
            goal = Vector.normalize(goal);
            goal = Vector.multiply(goal, -5);
            goal = Vector.add(goal, ball.pos);
            hero.command(peasant, "move", goal);
            hero.wait(0.5);
            hero.command(peasant, "move", ball.pos);
            hero.wait(0.5);
            hero.command(peasant, "move", goal);
            hero.wait(2);
        }
    }
}

```

[Previous page](https://discourse.codecombat.com/t/precision-kicking-help/10605.md?page=2)
