# Basin Stampede Issues

**URL:** <https://discourse.codecombat.com/t/basin-stampede-issues/9359>\
**Category:** Uncategorized\
**Created:** [October 16, 2016, 4:23pm UTC](https://discourse.codecombat.com/t/basin-stampede-issues/9359 "2016-10-16T16:23:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![isnode](https://avatars.discourse-cdn.com/v4/letter/i/b5e925/32.png) [@isnode](https://discourse.codecombat.com/u/isnode)\
**Post date:** [October 16, 2016, 4:23pm UTC](https://discourse.codecombat.com/t/basin-stampede-issues/9359/1 "2016-10-16T16:23:34Z")

</div>

```python
# Uh oh, a stampede! Use your cunning to make it to the oasis.

while True:
    enemy = hero.findNearestEnemy()
    xPos = hero.pos.x + 1
    yPos = 17
    if enemy:
        # You only need to shift up/down 1m to dodge the yaks!
        if enemy.pos.y > hero.pos.y:
            # If the Yak is above you, adjust yPos downwards!
            yPos = hero.pos.y - 1
            pass
        elif enemy.pos.y < hero.pos.y:
            # If the Yak is below you, adjust yPos upwards!
            yPos = hero.pos.y + 1
            pass
    hero.moveXY(xPos, yPos)

```

This is python but I always keep going down 1m and then die by the stampede

---

<div class="post-metadata">

**Author:** ![Harry\_the\_Wanderer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/harry_the_wanderer/32/5369_2.png) [@Harry\_the\_Wanderer](https://discourse.codecombat.com/u/Harry_the_Wanderer)\
**Post date:** [October 16, 2016, 5:04pm UTC](https://discourse.codecombat.com/t/basin-stampede-issues/9359/2 "2016-10-16T17:04:48Z")

</div>

> [@isnode](#):
>
> yPos = 17

Remember that locating this in the loop will always reset your yPos to 17
