# Danceoff level help \[Solved\]

**URL:** <https://discourse.codecombat.com/t/danceoff-level-help-solved/30495>\
**Category:** Level Help\
**Created:** [September 15, 2021, 11:27pm UTC](https://discourse.codecombat.com/t/danceoff-level-help-solved/30495 "2021-09-15T23:27:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrunchyCode](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/crunchycode/32/25873_2.png) [@CrunchyCode](https://discourse.codecombat.com/u/CrunchyCode)\
**Post date:** [September 15, 2021, 11:27pm UTC](https://discourse.codecombat.com/t/danceoff-level-help-solved/30495/1 "2021-09-15T23:27:58Z")

</div>

I cant figure out how to complete dance off can i have some help

---

<div class="post-metadata">

**Author:** ![CrunchyCode](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/crunchycode/32/25873_2.png) [@CrunchyCode](https://discourse.codecombat.com/u/CrunchyCode)\
**Post date:** [September 15, 2021, 11:31pm UTC](https://discourse.codecombat.com/t/danceoff-level-help-solved/30495/2 "2021-09-15T23:31:11Z")

</div>

I cant figure out how to find the x/y offset

---

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://discourse.codecombat.com/u/abc)\
**Post date:** [September 15, 2021, 11:34pm UTC](https://discourse.codecombat.com/t/danceoff-level-help-solved/30495/3 "2021-09-15T23:34:59Z")

</div>

First you would need to find the nearest friend, then you would need to create two new variables (x and y) and define them as friend.pos.x - hero.pos.x and friend.pos.y - hero.pos.y. After that, in a while true loop, you would need to move to {“x”: friend.pos.x - x, “y”: friend.pos.y - y}.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/a/a9445509d1a758c41b5ddcddc8c8e20a5dedb67f.png) [@system](https://discourse.codecombat.com/u/system)\
**Post date:** [September 16, 2021, 11:35am UTC](https://discourse.codecombat.com/t/danceoff-level-help-solved/30495/4 "2021-09-16T11:35:15Z")

</div>

Closed on September 16, 2021, 11:35am UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
